aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/read.rb
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/read.rb
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/read.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb6
1 files changed, 3 insertions, 3 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