From 035b4244bae8620515d3757fdc3be42ac77dddec Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Wed, 30 Nov 2011 16:12:51 +0000 Subject: Don't need second param --- activerecord/lib/active_record/attribute_methods/read.rb | 6 +++--- activerecord/lib/active_record/attribute_methods/serialization.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord') 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 -- cgit v1.2.3