dimanche 28 juin 2015

Cancancan ability for specific case

I use cancancan gem for role based authorization rules. I need to preform something like:

can :read, Post, Post.status = 1

This means that user can read post with status = 1. How can i do that?

Aucun commentaire:

Enregistrer un commentaire