From 821adfaadf7fe9309d39bb520e7a74f308bbcd8d Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Sun, 22 Jun 2014 14:48:30 -0600 Subject: Remove unneeded `@column_types` instance variable This was used more previously, but other uses have been removed. --- activerecord/lib/active_record/core.rb | 2 -- activerecord/lib/active_record/persistence.rb | 2 -- activerecord/lib/active_record/store.rb | 2 +- 3 files changed, 1 insertion(+), 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 -- cgit v1.2.3