diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-11-30 16:12:51 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-11-30 23:18:40 +0000 |
commit | 035b4244bae8620515d3757fdc3be42ac77dddec (patch) | |
tree | afdf6542cf3d324c70c663ce4094457ce82239e3 /activerecord/lib/active_record/attribute_methods | |
parent | efcc95acb71a68b9edd7c7c77550abdf412cc5ad (diff) | |
download | rails-035b4244bae8620515d3757fdc3be42ac77dddec.tar.gz rails-035b4244bae8620515d3757fdc3be42ac77dddec.tar.bz2 rails-035b4244bae8620515d3757fdc3be42ac77dddec.zip |
Don't need second param
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/read.rb | 6 | ||||
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/serialization.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb index 69507b5838..788d671ad1 100644 --- a/activerecord/lib/active_record/attribute_methods/read.rb +++ b/activerecord/lib/active_record/attribute_methods/read.rb @@ -94,15 +94,15 @@ module ActiveRecord value = @attributes[attr_name] unless value.nil? if column = column_for_attribute(attr_name) - type_cast_attribute(column, value) + type_cast_attribute(column) else value end end end - def type_cast_attribute(column, value) #:nodoc: - column.type_cast(value) + def type_cast_attribute(column) #:nodoc: + column.type_cast(@attributes[column.name]) end private diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb index 001620d889..ac65ef94f9 100644 --- a/activerecord/lib/active_record/attribute_methods/serialization.rb +++ b/activerecord/lib/active_record/attribute_methods/serialization.rb @@ -64,7 +64,7 @@ module ActiveRecord end end - def type_cast_attribute(column, value) + def type_cast_attribute(column) coder = self.class.serialized_attributes[column.name] if column.text? && coder |