diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-06-22 14:48:30 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-06-22 14:57:11 -0600 |
commit | 821adfaadf7fe9309d39bb520e7a74f308bbcd8d (patch) | |
tree | 32cf2317145a55967bd31c6c76cf855573ae1b5c /activerecord | |
parent | b663869940e642b06c903eba2eb2b362585ed194 (diff) | |
download | rails-821adfaadf7fe9309d39bb520e7a74f308bbcd8d.tar.gz rails-821adfaadf7fe9309d39bb520e7a74f308bbcd8d.tar.bz2 rails-821adfaadf7fe9309d39bb520e7a74f308bbcd8d.zip |
Remove unneeded `@column_types` instance variable
This was used more previously, but other uses have been removed.
Diffstat (limited to 'activerecord')
-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 |