Class/Module Index [+]

Quicksearch

Sequel::Plugins::SerializationModificationDetection::InstanceMethods

Public Instance Methods

after_save() click to toggle source

Clear the cache of original deserialized values after saving so that it doesn't show the column is modified after saving.

# File lib/sequel/plugins/serialization_modification_detection.rb, line 35
def after_save
  super
  @original_deserialized_values = {}
end
changed_columns() click to toggle source

Detect which serialized columns have changed.

# File lib/sequel/plugins/serialization_modification_detection.rb, line 41
def changed_columns
  cc = super
  cc = cc.dup if frozen?
  deserialized_values.each{|c, v| cc << c if !cc.include?(c) && original_deserialized_value(c) != v} 
  cc
end
freeze() click to toggle source

Freeze the original deserialized values when freezing the instance.

# File lib/sequel/plugins/serialization_modification_detection.rb, line 49
def freeze
  @original_deserialized_values ||= {}
  @original_deserialized_values.freeze
  super
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.