Hi,
I am quite a newbie on Elixir, I come from rails. And keep trying how to figure out what is the best way for handling a one-to-many through a join table.
A user have many rooms. But not all users only user with the admin role. So there is
- User table,
- Room table
- Admin the join table .
schema “admin” do
belongs_to :user, User
belongs_to :room, Room
end
What is the more idiomatic way to udpate the Admin for a given Room ?
I hope it is clear enought !