Module: CanTango::Permits::License::Rules
- Defined in:
- lib/cantango/permits/license/rules.rb
Instance Method Summary collapse
- #can(action, subject, conditions = nil, &block) ⇒ Object
- #cannot(action, subject, conditions = nil, &block) ⇒ Object
- #owns(user_account, clazz, ownership_relation = :user_id, user_id_attribute = :id) ⇒ Object
Instance Method Details
#can(action, subject, conditions = nil, &block) ⇒ Object
4 5 6 |
# File 'lib/cantango/permits/license/rules.rb', line 4 def can(action, subject, conditions = nil, &block) permit.can action, subject, conditions, &block end |
#cannot(action, subject, conditions = nil, &block) ⇒ Object
8 9 10 |
# File 'lib/cantango/permits/license/rules.rb', line 8 def cannot(action, subject, conditions = nil, &block) permit.cannot action, subject, conditions, &block end |
#owns(user_account, clazz, ownership_relation = :user_id, user_id_attribute = :id) ⇒ Object
12 13 14 |
# File 'lib/cantango/permits/license/rules.rb', line 12 def owns(user_account, clazz, ownership_relation = :user_id, user_id_attribute = :id) permit.owns user_account, clazz, ownership_relation, user_id_attribute end |