Class: RailsBlogEngine::Ability
- Inherits:
-
Object
- Object
- RailsBlogEngine::Ability
- Includes:
- CanCan::Ability
- Defined in:
- app/models/rails_blog_engine/ability.rb
Instance Method Summary collapse
-
#initialize(user) ⇒ Ability
constructor
A new instance of Ability.
Constructor Details
#initialize(user) ⇒ Ability
Returns a new instance of Ability.
5 6 7 8 9 10 |
# File 'app/models/rails_blog_engine/ability.rb', line 5 def initialize(user) can_read_blog if user && blog_admin?(user) can_manage_blog end end |