Devise, users should only see their own stuff

I'm creating an app where users have many people and things and people and things belong to users. I'm using Devise for authentication. I want any person or thing created to be associated with the id of the current user and for users to only be able to view, modify, delete their own people and things.

I don't yet have an idea for how to do the former. I believe that for the latter I need to use named_scopes but I don't quite understand them enough to figure out how to use them in this context.

The easiest way to do this is when they're signed_in using current_user.whatever in replacement of User.find(....) etc..

If you provide some code from your project I'd happily change it so it works.

I'd suggest checking out http://railscasts.co...ion-with-cancan and http://railscasts.com/episodes/385-authorization-from-scratch-part-1 which may give you a hand. CanCan doesn't work with Rails 4 out of the box, so be warned.