Class: RecordHistoryModel

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/record_history/record_history_model.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) new_value



18
19
20
21
# File 'lib/record_history/record_history_model.rb', line 18

def new_value
	self.new_value = nil if self.new_value_dump.nil?
	Marshal.load(self.new_value_dump)
end

- (Object) new_value=(value)



23
24
25
# File 'lib/record_history/record_history_model.rb', line 23

def new_value=(value)
	self.new_value_dump = Marshal.dump(value)
end

- (Object) old_value



9
10
11
12
# File 'lib/record_history/record_history_model.rb', line 9

def old_value
	self.old_value = nil if self.old_value_dump.nil?
	self.old_value_dump.nil? ? nil : Marshal.load(self.old_value_dump)
end

- (Object) old_value=(value)



14
15
16
# File 'lib/record_history/record_history_model.rb', line 14

def old_value=(value)
	self.old_value_dump = Marshal.dump(value)
end