That's the first step, but there's one more thing to do. For it work
you'll need some sort of authorization system--restful_authentication
just attempts to prove that someone is who they say they are, through
their access credentials. There are a lot of them out there but I
prefer one called restful_acl (find it on GitHub). It does require
that you're using RESTful controllers with standard CRUD actions--but
assuming that's so you can just add methods to your List model like
def is_readable_by(user, parent = nil)
self.user == user
end
In other words, if the user trying to access the list is the same as
the user associated with the list, let him view it. Otherwise he'll be
directed to an "access denied" view. Of course, you can also dictate
who's allowed to update or delete a list.
If you don't need something that complex, you could just check in the
list controller's #show method that @list.user == current_user.
So, I run rake gems:install. Then I get this:
ERROR: could not find gem mdarby-restful_acl locally or in a
repository
I've Googled that error message that haven't found anything. Ideas on
what I'm doing wrong? The restful_acl page is here:
http://wiki.github.com/mdarby/restful_acl.