Reputation: 1869
I got a real head scratcher here and I am in need of some direction. What do you do when you want a devise User to have nested objects of their own, not viewable nor accessible to other users? For instance: User has_many Customers which has_many Jobs. I can get User authentication to work and I can get Customers > Jobs nesting to work separately. Now, how do I get a user that has_many customers that has_many jobs?
What is the modern and efficient way to accomplish this problem with Devise?
Upvotes: 0
Views: 526
Reputation: 10738
There is nothing special about the User model that is generated by devise. You are free to add has_many customers to it. This railscast show how to integrate omniauth with devise and it includes changing the user model.
Upvotes: 1