Module: CanTango::PermitEngine::Compatibility
- Included in:
- CanTango::Permits::Permit
- Defined in:
- lib/cantango/permit_engine/compatibility.rb
Instance Method Summary collapse
Instance Method Details
#rules ⇒ Object
5 6 7 8 9 |
# File 'lib/cantango/permit_engine/compatibility.rb', line 5 def rules return rules_1_5 if rules_1_5 return rules_1_4 if rules_1_4 raise "CanCan ability.rules could not be found. Possibly due to CanCan API change since 1.5" end |
#rules_1_4 ⇒ Object
15 16 17 |
# File 'lib/cantango/permit_engine/compatibility.rb', line 15 def rules_1_4 ability.send :can_definitions end |
#rules_1_5 ⇒ Object
11 12 13 |
# File 'lib/cantango/permit_engine/compatibility.rb', line 11 def rules_1_5 ability.send :rules end |