Module: ActiveRecordPermissions::ModelUserAccess::Model::ClassMethods

Defined in:
lib/active_scaffold/active_record_permissions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_user_procObject

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



48
49
50
# File 'lib/active_scaffold/active_record_permissions.rb', line 48

def current_user_proc
  @current_user_proc
end

Instance Method Details

#current_userObject

Class-level access to the current user



51
52
53
# File 'lib/active_scaffold/active_record_permissions.rb', line 51

def current_user
  ActiveRecord::Base.current_user_proc.call if ActiveRecord::Base.current_user_proc
end