Module: ActiveScaffold::Bridges::Cancan::ModelUserAccess::Model::ClassMethods

Defined in:
lib/active_scaffold/bridges/cancan/cancan_bridge.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_ability_procObject

The proc to call that retrieves the current_ability from the ApplicationController.



57
58
59
# File 'lib/active_scaffold/bridges/cancan/cancan_bridge.rb', line 57

def current_ability_proc
  @current_ability_proc
end

Instance Method Details

#current_abilityObject

Class-level access to the current ability



60
61
62
# File 'lib/active_scaffold/bridges/cancan/cancan_bridge.rb', line 60

def current_ability
  ::Sequel::Model.current_ability_proc.call if ::Sequel::Model.current_ability_proc
end