diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-13 17:02:52 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-13 17:02:52 -0300 |
commit | 1dcb8e997e388cecc75d141812303d42c79a8481 (patch) | |
tree | 26b6bd31372ae9c9d279cafd3aaa850414bd0f05 /activerecord/lib/active_record/persistence.rb | |
parent | 1e45fbc2d4fb59a594e51445aac0e48df8923550 (diff) | |
parent | ea6f28c8a114396376bafe26e1af5d2ca3df6fdb (diff) | |
download | rails-1dcb8e997e388cecc75d141812303d42c79a8481.tar.gz rails-1dcb8e997e388cecc75d141812303d42c79a8481.tar.bz2 rails-1dcb8e997e388cecc75d141812303d42c79a8481.zip |
Merge pull request #15695 from sgrif/sg-rm-column-types-override
Remove unused column types override
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index c69a83c125..5c744762d9 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -53,12 +53,7 @@ module ActiveRecord type = column_types.fetch(name) { klass.type_for_attribute(name) } h[name] = Attribute.from_database(value, type) end - - klass.allocate.init_with( - 'attributes' => attributes, - 'column_types' => column_types, - 'new_record' => false, - ) + klass.allocate.init_with('attributes' => attributes, 'new_record' => false) end private @@ -406,8 +401,7 @@ module ActiveRecord @attributes.update(fresh_object.instance_variable_get('@attributes')) - @column_types = self.class.column_types - @column_types_override = fresh_object.instance_variable_get('@column_types_override') + @column_types = self.class.column_types self end |