Permalink
Browse files

only exclude serialized columns from cacheable columns

  • Loading branch information...
1 parent f86b198 commit f26fcc05f605caaa120db6af4c0e908cf8eb20c9 @tenderlove tenderlove committed Feb 9, 2012
@@ -88,7 +88,11 @@ def __temp__(v, attributes, attributes_cache, attr_name)
private
def cacheable_column?(column)
- attribute_types_cached_by_default.include?(column.type)
+ if attribute_types_cached_by_default == ATTRIBUTE_TYPES_CACHED_BY_DEFAULT
+ ! serialized_attributes.include? column.name
+ else
+ attribute_types_cached_by_default.include?(column.type)
+ end
end
def internal_attribute_access_code(attr_name, cast_code)
@@ -776,7 +776,7 @@ def cached_columns
end
def time_related_columns_on_topic
- Topic.columns.select { |c| c.type.in?([:time, :date, :datetime, :timestamp]) }
+ Topic.columns.select { |c| [:time, :date, :datetime, :timestamp].include?(c.type) }
end
def in_time_zone(zone)

0 comments on commit f26fcc0

Please sign in to comment.