Class: Audit
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Audit
- Defined in:
- lib/generators/active_audit/templates/install_model.rb
Constant Summary collapse
- SOURCES =
{ app: 0, api: 1 }
Class Method Summary collapse
Class Method Details
.record!(object, action, user: ActiveAudit.configuration.auditor, source: :app, comment: nil, remote_ip: nil, remote_uuid: nil) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/generators/active_audit/templates/install_model.rb', line 20 def self.record!(object, action, user: ActiveAudit.configuration.auditor, source: :app, comment: nil, remote_ip: nil, remote_uuid: nil) create!({ auditable: object, user: user, source: source, action: action, revisions: object.changes, comment: comment, remote_ip: remote_ip, remote_uuid: remote_uuid }) end |