diff options
Diffstat (limited to 'activerecord/lib/active_record/type/helpers/mutable.rb')
-rw-r--r-- | activerecord/lib/active_record/type/helpers/mutable.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/type/helpers/mutable.rb b/activerecord/lib/active_record/type/helpers/mutable.rb index 9af39aa9fb..94f246f567 100644 --- a/activerecord/lib/active_record/type/helpers/mutable.rb +++ b/activerecord/lib/active_record/type/helpers/mutable.rb @@ -3,14 +3,14 @@ module ActiveRecord module Helpers module Mutable # :nodoc: def type_cast_from_user(value) - deserialize(type_cast_for_database(value)) + deserialize(serialize(value)) end # +raw_old_value+ will be the `_before_type_cast` version of the # value (likely a string). +new_value+ will be the current, type # cast value. def changed_in_place?(raw_old_value, new_value) - raw_old_value != type_cast_for_database(new_value) + raw_old_value != serialize(new_value) end end end |