put a table / model like orginiation_user_roles / OrganizationUserRole with columns like organization_id, user_id , and roll . Make the roll as enum type http://edgeapi.rubyonrails.org/classes/ActiveRecord/Enum.html . I hope my answer helps.
On Sun, May 29, 2016 at 9:16 PM, John Sanderbeck <li...@ruby-forum.com> wrote: > What I am trying to do is setup a set of joins that do the following > > User has a global role such as :global_admin, :building_admin, etc > > I also have Organizations, Districts, and Buildings > > I would like a user to be able to be assigned a different role per > Organization, District, or Building > > I have a User with a global_role and that works fine. > > I can't figure out how to define the user to be part of say an > Organization with different role. > > Can anyone can show me an example or point me in the right direction to > figure this out? > > John > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/703029e437465274d6a23b07331b933f%40ruby-forum.com > . > For more options, visit https://groups.google.com/d/optout. > -- Karthikeyan A K http://thepro.in/profiles/karthikeyan-a-k-1 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAJR%2B9kbHpFEfMsjBZK4DBPzchxtS-1cf2%2B_N_-%2Bc_O_fnv9zyA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.