instance method
loaded?
Ruby on Rails 5.2.8.1
Since v4.0.13Signature
loaded?()
Returns true if the association has been loaded, otherwise false.
person.pets.loaded? # => false person.pets person.pets.loaded? # => true
Source
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 54
def loaded?
@association.loaded?
end
Defined in activerecord/lib/active_record/associations/collection_proxy.rb line 54
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Associations::CollectionProxy