aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods.rb
diff options
context:
space:
mode:
authorNikita Afanasenko <nikita@afanasenko.name>2012-11-10 01:45:43 +0400
committerNikita Afanasenko <nikita@afanasenko.name>2012-11-10 01:45:43 +0400
commit410e887a446e82399cca535bc0a9f12647d7dbf3 (patch)
tree015fa75157e055521dd50782a406d4522e964c15 /activerecord/lib/active_record/attribute_methods.rb
parent90a1721c3171bce08b20b9ce4765ba9eeea725cd (diff)
downloadrails-410e887a446e82399cca535bc0a9f12647d7dbf3.tar.gz
rails-410e887a446e82399cca535bc0a9f12647d7dbf3.tar.bz2
rails-410e887a446e82399cca535bc0a9f12647d7dbf3.zip
Keep the code related to serialization in Serialization module.
We should not need any `serialized_attributes` checks outside `ActiveRecord::AttributeMethods::Serialization` module.
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index 437fd00948..e0bfdb8f3e 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -369,14 +369,10 @@ module ActiveRecord
end
def typecasted_attribute_value(name)
- if self.class.serialized_attributes.include?(name)
- @attributes[name].serialized_value
- else
- # FIXME: we need @attributes to be used consistently.
- # If the values stored in @attributes were already typecasted, this code
- # could be simplified
- read_attribute(name)
- end
+ # FIXME: we need @attributes to be used consistently.
+ # If the values stored in @attributes were already typecasted, this code
+ # could be simplified
+ read_attribute(name)
end
end
end