instance method
cached_attributes
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
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.rb, line 119
def cached_attributes
@cached_attributes ||=
columns.select{|c| attribute_types_cached_by_default.include?(c.type)}.map(&:name).to_set
end
Defined in activerecord/lib/active_record/attribute_methods.rb line 119
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods::ClassMethods