lib/generators/devise_authorizable/templates/ability.rb
# Add a method for each role you have in your application and add abilities.
# Check the README under "Managing Permission / Defining abilities." on
# how that works.
#
# Remember: There are two build in roles: +guest+ which are users that are
# not signed in and +authenticated+ which are signed in users.
Add a method for each role you have in your application and add abilities.
Check the README under "Managing Permission / Defining abilities." on
how that works.

There are two build in roles: +guest+ which are users that are
not signed in and +authenticated+ which are signed in users.
Add a method for each role you have in your application and add abilities . Check the README under " Managing Permission / Defining abilities . " on how that works . There are two build in roles : + guest + which are users that are not signed in and + authenticated + which are signed in users .
def authenticated
    can :create, :all
    can [:update, :destroy], :all, user_id: user.id
  end
def authenticated can :create , :all can [ :update , :destroy ] , :all , user_id : user . id end
Add a method for each role you have in your application and add abilities.
Add a method for each role you have in your application and add abilities .
# Only allow update and destroy on own stuff.