Class: PaperTrailAudit::Change
- Inherits:
-
Object
- Object
- PaperTrailAudit::Change
- Includes:
- ActiveModel::Model
- Defined in:
- lib/paper_trail-audit/change.rb
Instance Attribute Summary collapse
-
#new_value ⇒ Object
Returns the value of attribute new_value.
-
#old_value ⇒ Object
Returns the value of attribute old_value.
-
#time ⇒ Object
Returns the value of attribute time.
-
#whodunnit ⇒ Object
Returns the value of attribute whodunnit.
Instance Method Summary collapse
-
#==(other) ⇒ Object
validates [:old_value,:new_value,:time], presence: true validates :next, presence: true validates :time, presence: true.
Instance Attribute Details
#new_value ⇒ Object
Returns the value of attribute new_value.
4 5 6 |
# File 'lib/paper_trail-audit/change.rb', line 4 def new_value @new_value end |
#old_value ⇒ Object
Returns the value of attribute old_value.
4 5 6 |
# File 'lib/paper_trail-audit/change.rb', line 4 def old_value @old_value end |
#time ⇒ Object
Returns the value of attribute time.
4 5 6 |
# File 'lib/paper_trail-audit/change.rb', line 4 def time @time end |
#whodunnit ⇒ Object
Returns the value of attribute whodunnit.
4 5 6 |
# File 'lib/paper_trail-audit/change.rb', line 4 def whodunnit @whodunnit end |
Instance Method Details
#==(other) ⇒ Object
validates [:old_value,:new_value,:time], presence: true validates :next, presence: true validates :time, presence: true
8 9 10 11 12 13 |
# File 'lib/paper_trail-audit/change.rb', line 8 def ==(other) self.old_value == other.old_value && self.new_value == other.new_value && self.time == other.time && self.whodunnit == other.whodunnit end |