提交 f26fcc05 编写于 作者: A Aaron Patterson

only exclude serialized columns from cacheable columns

上级 f86b1984
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册