Sha256: df65950a5fc92e795a7fa44599da8034852a5b2d2573ce79a34132a998e3ffb1
Contents?: true
Size: 362 Bytes
Versions: 7
Compression:
Stored size: 362 Bytes
Contents
# @private class AuditSweeper < ActionController::Caching::Sweeper observe Audit def before_create(audit) audit.user ||= current_user audit.remote_address = controller.try(:request).try(:ip) end def current_user controller.send ActsAsAudited.current_user_method if controller.respond_to?(ActsAsAudited.current_user_method, true) end end
Version data entries
7 entries across 7 versions & 2 rubygems