views:

116

answers:

1

Say I have a simple todo app and I want the users to see only their todos. I'm having trouble authorizing with Authlogic. In restful_authentication, I just do

def index
  @post = current_user.posts.find.all
end

But I'm unable to do that with authlogic. I looked into declarative_authorization, but still can't get it to work.

I want the user to see, edit, destroy only his todos. How do I do that?

Any help is appreciated.

A: 

Does your Authlogic user model have an association with Posts?

Toby Hede
Yes. Turns out the problem was my current_user method was in private. Thanks for the reply.
Senthil