Module: AuditTrail::Model
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/audit_trail/model.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#change_type ⇒ Object
26 27 28 |
# File 'lib/audit_trail/model.rb', line 26 def change_type @change_type ||= changed_object.class.audit_trail_types[changed_attribute.to_s] end |
#previous_value ⇒ Object
22 23 24 |
# File 'lib/audit_trail/model.rb', line 22 def previous_value send("previous_#{change_type}_value") end |
#value ⇒ Object
18 19 20 |
# File 'lib/audit_trail/model.rb', line 18 def value send("#{change_type}_value") end |