Module: ActiveRecordPermissions::ModelUserAccess::Model::ClassMethods
- Defined in:
- lib/active_scaffold/active_record_permissions.rb
Instance Attribute Summary collapse
-
#current_user_proc ⇒ Object
The proc to call that retrieves the current_user from the ApplicationController.
Instance Method Summary collapse
-
#current_user ⇒ Object
Class-level access to the current user.
Instance Attribute Details
#current_user_proc ⇒ Object
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_user ⇒ Object
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 |