Class: Ability
- Inherits:
-
Object
- Object
- Ability
- Includes:
- CanCan::Ability, PaidUp::Ability
- Defined in:
- lib/generators/paid_up/install/templates/ability.rb
Overview
CanCanCan Ability class
Instance Method Summary collapse
-
#initialize(user) ⇒ Ability
constructor
A new instance of Ability.
Methods included from PaidUp::Ability
Constructor Details
#initialize(user) ⇒ Ability
Returns a new instance of Ability.
8 9 10 11 12 13 14 15 |
# File 'lib/generators/paid_up/install/templates/ability.rb', line 8 def initialize(user) user ||= User.new # anonymous user (not logged in) # Rails Application's initialization could go here. # can :manage, Group, user: user initialize_paid_up(user) end |