Convenience functions for many_to_many relationships?
I'm trying to wrap my head around creating convenience functions for
many_to_many relationships. Given the resources below, what I'd like to do is have an add_to_hub action in the User module that takes in a Hub record and creates a corresponding UsersToHubs record.
How would I go about setting up that action, and is placing a function like this inside of my User resource module at all idiomatic for Ash?
I cut off the TestApp.Hubs.Hub module due to character limit, but I set it up the same way as my User module
Solution:Jump to solution
I appreciate the very kind "read the manual" haha. Definitely overlooked the
many_to_many example when I was reading the docs earlier.
So it's basically just:
```elixir
update :assign_to_hub do...2 Replies
YOu should look into managing relationships and report back
Solution
I appreciate the very kind "read the manual" haha. Definitely overlooked the
many_to_many example when I was reading the docs earlier.
So it's basically just:
Very cool.