I have the following models in my rails application
class User < ApplicationRecord
end
class Group < ApplicationRecord
end
class Role < ApplicationRecord
end
Every Group
has_many User
with different Role
. For example Group-1
have User - A
with Role - Admin
and Group-1
have User - B
with Role - Member
and Group-2
have User - A
with Role - Member
. Like wise each Group
have multiple Users
and every User
have multiple Role
.
Please guide What kind of association should I use?