Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Clearer documentation for controlling sub-models #928

Open
and-ers opened this Issue Sep 4, 2013 · 0 comments

Comments

Projects
None yet
1 participant

and-ers commented Sep 4, 2013

Why not make it clear in the documentation for how to handle abiilities with submodels?

https://github.com/ryanb/cancan/wiki/defining-abilities

An example(User -> Post -> Comment):

can :manage, Comment, comment_id: { post_id: { user_id: user.id }}

is IMHO better as an example than

can :read, Project, :category => { :visible => true }

/Anders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment