Module: ActiveScaffold::CancanBridge::ModelUserAccess::Model::ClassMethods
- Defined in:
- lib/active_scaffold/bridges/cancan/lib/cancan_bridge.rb
Instance Attribute Summary collapse
-
#current_ability_proc ⇒ Object
The proc to call that retrieves the current_ability from the ApplicationController.
Instance Method Summary collapse
-
#current_ability ⇒ Object
Class-level access to the current ability.
Instance Attribute Details
#current_ability_proc ⇒ Object
The proc to call that retrieves the current_ability from the ApplicationController.
57 58 59 |
# File 'lib/active_scaffold/bridges/cancan/lib/cancan_bridge.rb', line 57 def current_ability_proc @current_ability_proc end |
Instance Method Details
#current_ability ⇒ Object
Class-level access to the current ability
60 61 62 |
# File 'lib/active_scaffold/bridges/cancan/lib/cancan_bridge.rb', line 60 def current_ability ::ActiveRecord::Base.current_ability_proc.call if ::ActiveRecord::Base.current_ability_proc end |