Skip to content
Browse files

Merge pull request #15867 from sgrif/sg-rm-column-types

Remove unneeded `@column_types` instance variable
  • Loading branch information...
2 parents 04b6ae4 + 821adfa commit 8a6b8c8a7991796ae961db2be0b0f683a1c1efc6 @senny senny committed Jun 23, 2014
View
2 activerecord/lib/active_record/core.rb
@@ -254,7 +254,6 @@ def initialize(attributes = nil, options = {})
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 @@ def initialize(attributes = nil, options = {})
# post.title # => 'hello world'
def init_with(coder)
@attributes = coder['attributes']
- @column_types = self.class.column_types
init_internals
View
2 activerecord/lib/active_record/persistence.rb
@@ -396,8 +396,6 @@ def reload(options = nil)
end
@attributes = fresh_object.instance_variable_get('@attributes')
-
- @column_types = self.class.column_types
self
end
View
2 activerecord/lib/active_record/store.rb
@@ -129,7 +129,7 @@ def write_store_attribute(store_attribute, key, value)
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

0 comments on commit 8a6b8c8

Please sign in to comment.
Something went wrong with that request. Please try again.