diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/serialization.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index fb6473b7c7..d2a8006069 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -289,7 +289,7 @@ module ActiveRecord # Placeholder so it can be overriden when needed by serialization def attributes_for_coder # :nodoc: - attributes + attributes_before_type_cast end # Returns an <tt>#inspect</tt>-like string for the value of the diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb index b247bf8a45..e8a52719ef 100644 --- a/activerecord/lib/active_record/attribute_methods/serialization.rb +++ b/activerecord/lib/active_record/attribute_methods/serialization.rb @@ -138,7 +138,7 @@ module ActiveRecord attrs[name] = if self.class.serialized_attributes.include?(name) @raw_attributes[name].serialized_value else - read_attribute(name) + read_attribute_before_type_cast(name) end end end |