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

Defined in:
lib/six-updater-web/vendor/plugins/active_scaffold/lib/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.



55
56
57
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_record_permissions.rb', line 55

def current_user_proc
  @current_user_proc
end

Instance Method Details

#current_userObject

Class-level access to the current user



58
59
60
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_record_permissions.rb', line 58

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