ken-kost
AEAsh Elixir
•Created by madhu on 5/20/2025 in #support
Getting protocol Phoenix.HTML.Safe not implemented with "Ash Phoenix"
🤔 now I see the first line is commented out also. I'm thinking it should be the other way around, or just
phoenix_form = to_form(form, as: "user_profile")
did you try that and it didn't work?43 replies
AEAsh Elixir
•Created by madhu on 5/20/2025 in #support
Getting protocol Phoenix.HTML.Safe not implemented with "Ash Phoenix"

43 replies
AEAsh Elixir
•Created by kira🌺 on 5/12/2025 in #showcase
hapësirë - quote collection with a simple API
do you have experience with LiveView then?
15 replies
AEAsh Elixir
•Created by kira🌺 on 5/12/2025 in #showcase
hapësirë - quote collection with a simple API
oh, I thought it was live view. Like a live component was the quote box. my bad, now I see it's a JSON:API service.
you know what, I could fork it and make my own live view version. 🤠
15 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
you would have
then you would create that module, use ManualRelationship and implement your load that queries your other database.
then you could use that relationship in an aggregate as mentioned above
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
there is Manual Relationship
maybe with that you could "load" the appropriate sessions from the other database
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
another idea 💡
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
🤔 yea...
could you post the
postgres
sections from your resources? just to check28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
okay, so there is Custom aggregates in the query
i.e. in
opts
for aggregate/4
you can give query
; you could construct your query regarding sessions, check if the query works. add filtering to it regarding user ids and what not.
give that query for the aggregate call.
maybe that could work 🤔28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
do try and let me know, now I'm curious 🤠
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
session event has a column user_id which is the same as id of user from the other db
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
I got a feeling it should still work
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
🤔 that's interesting. did you try? what happens?
just to check, you have two resources, user and session_event. one is looking at one db, the other on another, right?
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
yes. is it true that user has many sessions?
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
hence why I said since user has many session events 😅 I thought you already defined that relationship
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
you also need the relationship:
has_many :session_events, MyApp.Ash.Dashboards.SessionEvent
28 replies
AEAsh Elixir
•Created by Ege on 5/16/2025 in #support
Calculating average number of sessions per user
what you want is an aggregate
since user has many session events you could give user resource an aggregate:
something like that maybe
28 replies
AEAsh Elixir
•Created by Failz on 5/16/2025 in #support
receiving an Ash Error and don't understand why
I think
:liked_posts
used like_relationships
destination attribute :user_id
which made App.Elevate.Post
that it doesn't know that reference7 replies
AEAsh Elixir
•Created by Failz on 5/16/2025 in #support
receiving an Ash Error and don't understand why
@Failz try maybe this 👀
7 replies
AEAsh Elixir
•Created by kira🌺 on 5/12/2025 in #showcase
hapësirë - quote collection with a simple API
yea, nifty! I have a feature request 🤓 It would be cool to have auto-refresh. So it can be in the background switching; every time you look up it's some other quote
15 replies