instance method
cache_attribute?
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v4.1.16Signature
cache_attribute?(attr_name)
Returns true if the provided attribute is being cached.
Parameters
-
attr_namereq
Source
# File activerecord/lib/active_record/attribute_methods/read.rb, line 33
def cache_attribute?(attr_name)
cached_attributes.include?(attr_name)
end
Defined in activerecord/lib/active_record/attribute_methods/read.rb line 33
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods::Read::ClassMethods