I’m working on simple contact manager that supports multi-user. I’m using with Rails, Device, and MongoDB with MongoID.
With devise, I easily attached basic login functionality with devise, and used embedded_in for attaching contact model to user model.
However, I can’t make user’s dashboard page(and RESTful API endpoint) that displays user’s contact list. I should make every users’ contact list private to each user.
EDIT : I followed RailsApp tutorial, and this is what I’ve done so far. I have index page that displays every users’ list, and detail view for adding contact data.
The problem is, when user sign up, every user can see everyone’s contact. I want to restrict every user should only see their contact list.
And one more thing, I want to unify API endpoint for every user like:
http://domain.tld/contact.json for logged in user’s contact.


Devise will give you this helper
current_user. So you can do this in your controller.Then in your view
Is that what you’re after?