diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-06-23 14:32:18 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-06-23 14:32:18 +0200 |
commit | 8a6b8c8a7991796ae961db2be0b0f683a1c1efc6 (patch) | |
tree | d126dee344c780282d09981cd69317bef464bb3c /activerecord/lib/active_record | |
parent | 04b6ae4d186195008b7801df19ebba295f042288 (diff) | |
parent | 821adfaadf7fe9309d39bb520e7a74f308bbcd8d (diff) | |
download | rails-8a6b8c8a7991796ae961db2be0b0f683a1c1efc6.tar.gz rails-8a6b8c8a7991796ae961db2be0b0f683a1c1efc6.tar.bz2 rails-8a6b8c8a7991796ae961db2be0b0f683a1c1efc6.zip |
Merge pull request #15867 from sgrif/sg-rm-column-types
Remove unneeded `@column_types` instance variable
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/core.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/store.rb | 2 |
3 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index f444a32d74..10b9e27b7d 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -254,7 +254,6 @@ module ActiveRecord end @attributes = self.class.attributes_builder.build_from_database(defaults) - @column_types = self.class.column_types init_internals initialize_internals_callback @@ -280,7 +279,6 @@ module ActiveRecord # post.title # => 'hello world' def init_with(coder) @attributes = coder['attributes'] - @column_types = self.class.column_types init_internals diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 86cc928644..ee634d7bb3 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -396,8 +396,6 @@ module ActiveRecord end @attributes = fresh_object.instance_variable_get('@attributes') - - @column_types = self.class.column_types self end diff --git a/activerecord/lib/active_record/store.rb b/activerecord/lib/active_record/store.rb index 7014bc6d45..219e19dbb8 100644 --- a/activerecord/lib/active_record/store.rb +++ b/activerecord/lib/active_record/store.rb @@ -129,7 +129,7 @@ module ActiveRecord private def store_accessor_for(store_attribute) - @column_types[store_attribute.to_s].accessor + type_for_attribute(store_attribute.to_s).accessor end class HashAccessor |