Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveRecord::Relation
load(&block) public

Causes the records to be loaded from the database if they have not been loaded already. You can use this if for some reason you need to explicitly load some records before actually using them. The return value is the relation itself, not the records.

Post.where(published: true).load # => #<ActiveRecord::Relation>
Show source
Register or log in to add new notes.