W dniu 26.11.2010 04:49, Scorpio pisze:
> I've ran into a problem. I've got a model set up but I'd like the
> user  only to be able to access their entries
> 
> I've added the shorthand
>    belongs_to :user, :creator => true
> to the model but I've got no clue how to evaluate that in permissions
> I've tried so far
> is_owner?
> User.is(creator) - same with owner
> User.is_not(creator)
> acting_user.self?
> acting_user == self
> - the two above with current_user
> 
> Help please. I'm out of ideas
> 

You probably want to use

user_is?(acting_user)

Joachim

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to