Skip to content

Instantly share code, notes, and snippets.

@tquiroga
Created January 14, 2015 17:46
Show Gist options
  • Save tquiroga/e4358ce914669f582458 to your computer and use it in GitHub Desktop.
Save tquiroga/e4358ce914669f582458 to your computer and use it in GitHub Desktop.
Cancan Auth
can :index, Message, :project_id => project.id # AND user.projects.include?(project)
#I tried adding after it, doesn't work, it's ignored
can :index, Message if user.projects.include?(project)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment