Rails 3 company account with many users, restrict access to data
问题 I'm wondering about the best way to structure authentication/authorization in my app. I want to have many company accounts, possibly using subdomains account has many users and users can only access records that were created by themselves or another user with the same account. The research I've done provides lots of mix n' match ideas for combining devise / cancan / authlogic in weird and wonderful ways, but I've yet to find anything which shows me the best way to restrict user access to data