instance method
cached_attributes
Ruby on Rails 4.0.13
Since v3.0.20 Last seen in v4.1.16Signature
cached_attributes()
Returns the attributes which are cached. By default time related columns with datatype :datetime, :timestamp, :time, :date are cached.
Source
# File activerecord/lib/active_record/attribute_methods/read.rb, line 24
def cached_attributes
@cached_attributes ||= columns.select { |c| cacheable_column?(c) }.map { |col| col.name }.to_set
end
Defined in activerecord/lib/active_record/attribute_methods/read.rb line 24
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods::Read::ClassMethods