class method
self.find_every
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18 PrivateAvailable in: v2.2.3 v2.3.18
Signature
self.find_every(options)
No documentation comment.
Parameters
-
optionsreq
Source
# File activerecord/lib/active_record/base.rb, line 1576
def find_every(options)
include_associations = merge_includes(scope(:find, :include), options[:include])
if include_associations.any? && references_eager_loaded_tables?(options)
records = find_with_associations(options)
else
records = find_by_sql(construct_finder_sql(options))
if include_associations.any?
preload_associations(records, include_associations)
end
end
records.each { |record| record.readonly! } if options[:readonly]
records
end
Defined in activerecord/lib/active_record/base.rb line 1576
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Base