Class: AuditModel::Models::Base
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AuditModel::Models::Base
- Defined in:
- lib/audit_model/models/base.rb
Constant Summary collapse
- BLACK_LIST =
[ "id", "created_at", "updated_at" ]
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build(model, type) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/audit_model/models/base.rb', line 18 def build(model, type) return if type == :update && !any_change?(model) attrs = sanitize(model, type) attrs[:rev_type] = type new(attrs) end |
Instance Method Details
#who ⇒ Object
13 14 15 |
# File 'lib/audit_model/models/base.rb', line 13 def who revision.user end |