Class: AuditSweeper
- Inherits:
-
ActionController::Caching::Sweeper
- Object
- ActionController::Caching::Sweeper
- AuditSweeper
- Defined in:
- lib/acts_as_audited/audit_sweeper.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#before_create(audit) ⇒ Object
23 24 25 |
# File 'lib/acts_as_audited/audit_sweeper.rb', line 23 def before_create(audit) audit.user ||= current_user end |
#current_user ⇒ Object
27 28 29 |
# File 'lib/acts_as_audited/audit_sweeper.rb', line 27 def current_user controller.send :current_user if controller.respond_to?(:current_user, true) end |