aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-11-30 16:12:51 +0000
committerJon Leighton <j@jonathanleighton.com>2011-11-30 23:18:40 +0000
commit035b4244bae8620515d3757fdc3be42ac77dddec (patch)
treeafdf6542cf3d324c70c663ce4094457ce82239e3 /activerecord/lib/active_record/attribute_methods
parentefcc95acb71a68b9edd7c7c77550abdf412cc5ad (diff)
downloadrails-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.rb6
-rw-r--r--activerecord/lib/active_record/attribute_methods/serialization.rb2
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