Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Ability not showing expected behaviour #1017

Open
creativetags opened this issue Sep 1, 2014 · 1 comment
Open

Ability not showing expected behaviour #1017

creativetags opened this issue Sep 1, 2014 · 1 comment

Comments

@creativetags
Copy link

I'm having an issue setting up an ability that looks like this:

can :read, Project, :allocate_to => user.id

The problem is

ability.can?(:read, my_project)

returns false even though

Project.accessible_by(ability)

returns just the projects for that user as expected.

I'm running 1.6.10 on rails 3.2.19 with ruby 1.9.3-p547

Is this a bug with cancan or my code? How do I find out why ability.can?(:read, my_project) is failing?

@creativetags
Copy link
Author

See CanCanCommunity/cancancan#121

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant