diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-06-01 22:24:01 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-06-01 22:24:01 +0200 |
commit | 02ee081cd645b51cbdfb28cd305777d3257ad871 (patch) | |
tree | 1b02b3ccffbef9296aaa6660caed5c64fcb362aa /activerecord/lib/active_record/validations/uniqueness.rb | |
parent | 260c384bdb539265b31d3937df48e528acb50800 (diff) | |
parent | 90c8be76a7d00475be5ff4db2eeedde5cc936c2d (diff) | |
download | rails-02ee081cd645b51cbdfb28cd305777d3257ad871.tar.gz rails-02ee081cd645b51cbdfb28cd305777d3257ad871.tar.bz2 rails-02ee081cd645b51cbdfb28cd305777d3257ad871.zip |
Merge pull request #15435 from sgrif/sg-rm-serialization
Remove most code related to serialized properties
Diffstat (limited to 'activerecord/lib/active_record/validations/uniqueness.rb')
-rw-r--r-- | activerecord/lib/active_record/validations/uniqueness.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index b6fccc9b94..2e7b1d7206 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -14,7 +14,6 @@ module ActiveRecord finder_class = find_finder_class_for(record) table = finder_class.arel_table value = map_enum_attribute(finder_class, attribute, value) - value = deserialize_attribute(record, attribute, value) relation = build_relation(finder_class, table, attribute, value) relation = relation.and(table[finder_class.primary_key.to_sym].not_eq(record.id)) if record.persisted? @@ -86,12 +85,6 @@ module ActiveRecord relation end - def deserialize_attribute(record, attribute, value) - coder = record.class.serialized_attributes[attribute.to_s] - value = coder.dump value if value && coder - value - end - def map_enum_attribute(klass, attribute, value) mapping = klass.defined_enums[attribute.to_s] value = mapping[value] if value && mapping |