From d5f7884dc5e74cd876f031ea2d4467cec18defbb Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Wed, 30 Nov 2011 22:45:35 +0000 Subject: Don't check column type, you might implement a custom coder that serializes to a different type --- activerecord/lib/active_record/attribute_methods/serialization.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb index bc7e9d7a94..b084fdc25b 100644 --- a/activerecord/lib/active_record/attribute_methods/serialization.rb +++ b/activerecord/lib/active_record/attribute_methods/serialization.rb @@ -81,7 +81,7 @@ module ActiveRecord end def type_cast_attribute(column) - if column.text? && self.class.serialized_attributes.include?(column.name) + if self.class.serialized_attributes.include?(column.name) @attributes[column.name].unserialized_value else super -- cgit v1.2.3