Top "Cancan" questions

The CanCan gem offers a straight forward and flexible way to define what a user can and cannot do.

Rails3 - CanCan - uninitialized constant Ability::Page

I have just added cancan 1.5.0 to my rails 3 app here is my ability file - def initialize(user) user ||= User.…

ruby-on-rails ruby-on-rails-3 cancan
CanCan: limiting a user's ability to set certain model attributes based on their role

I have a Post model with a :published attribute (boolean) and a User model with a role attribute (string). There …

ruby-on-rails cancan
Is possible CanCan can :manage, :all except one or more method?

I'm doing: can :manage, :all if user.role == 'admin' can :approve, Anuncio do |anuncio| anuncio.try(:aprovado) == false end My …

ruby-on-rails ruby ruby-on-rails-3 cancan