Displaying 1 result from an estimated 1 matches for "companies_us".
Did you mean:
companies_url
2008 Apr 11
1
Multi-user multi-company design
...tors would invite other users to access the
company''s site.
Also, one user can belong to different companies and perhaps have
different access at each company.
I''m struggling to determine how to nest the models, here is my best
guess:
User
has_many :companies, :through => :companies_users
end
Company
has_many :ferms
has_many :users, :through => :companies_users
end
The companies_users join table would have a column that describes the
access (1,2,3?) for that user at that company.
When a user logs in and wants to view his list of ferms at Company X
the Ferms#index contro...