Class: Ability
- Inherits:
-
Object
- Object
- Ability
- Includes:
- CanCan::Ability, Pageflow::AbilityMixin
- Defined in:
- lib/generators/pageflow/cancan/templates/ability.rb
Instance Method Summary collapse
-
#initialize(user) ⇒ Ability
constructor
A new instance of Ability.
Methods included from Pageflow::AbilityMixin
Methods included from Pageflow::ActiveAdminCanCanFix
Constructor Details
#initialize(user) ⇒ Ability
Returns a new instance of Ability.
5 6 7 8 9 10 11 |
# File 'lib/generators/pageflow/cancan/templates/ability.rb', line 5 def initialize(user) # Setup abilities for Pageflow models pageflow_default_abilities(user) # Allow signed-in users to view the admin dashboard can :read, ActiveAdmin::Page, :name => "Dashboard" end |