aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/read.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods/read.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index ae3785638a..a354cd7503 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -123,9 +123,9 @@ module ActiveRecord
}
if self.class.cache_attribute?(name)
- @attributes[name] = column.type_cast(value)
+ @attributes[name] = column.type_cast_from_database(value)
else
- column.type_cast value
+ column.type_cast_from_database value
end
}
end