ruby on rails - Set ability.rb but still have admin able to delete user? -


i'm working in ruby , in ability.rb file, have:

when "admin_junior"   cannot :delete, user   .   . when "admin_senior"   can :delete, user   .   . end 

but in users.rb file have

actions :all, :except => [:edit, :new] 

i thought doing have when admins login, admin_junior not able delete user , admin_senior able delete user. allows both view delete option user, , apply well. how modify admin_junior not able delete users admin_senior will?

sorry...first post had typo

try this

when "admin_junior"   cannot :delete, user   .   . when "admin_senior"   can :delete, user   .   . end 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -