Namespace
Methods
#
A
R
T
Instance Public methods
_field_changed?(attr, old, value)
# File activerecord/lib/active_record/attribute_methods/serialization.rb, line 93
def _field_changed?(attr, old, value)
  if self.class.serialized_attributes.include?(attr)
    old != value
  else
    super
  end
end
attributes_before_type_cast()
# File activerecord/lib/active_record/attribute_methods/serialization.rb, line 109
def attributes_before_type_cast
  super.dup.tap do |attributes|
    self.class.serialized_attributes.each_key do |key|
      if attributes.key?(key)
        attributes[key] = attributes[key].unserialized_value
      end
    end
  end
end
read_attribute_before_type_cast(attr_name)
# File activerecord/lib/active_record/attribute_methods/serialization.rb, line 101
def read_attribute_before_type_cast(attr_name)
  if serialized_attributes.include?(attr_name)
    super.unserialized_value
  else
    super
  end
end
type_cast_attribute_for_write(column, value)
# File activerecord/lib/active_record/attribute_methods/serialization.rb, line 85
def type_cast_attribute_for_write(column, value)
  if column && coder = self.class.serialized_attributes[column.name]
    Attribute.new(coder, value, :unserialized)
  else
    super
  end
end