Class: AuditModel::Models::Revision
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AuditModel::Models::Revision
- Defined in:
- lib/audit_model/models/revision.rb
Class Method Summary collapse
Class Method Details
.audit(model, type) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/audit_model/models/revision.rb', line 9 def audit(model, type) data = { model: model, user: Thread.current[:user], revision_date: Time.now, audit: audit_class_for(model).build(model, type) } create(data) end |