instance method
_find_record
Ruby on Rails 8.0.4
Since v7.0.10 PrivateSignature
_find_record(options)
No documentation comment.
Parameters
-
optionsreq
Source
# File activerecord/lib/active_record/persistence.rb, line 826
def _find_record(options)
all_queries = options ? options[:all_queries] : nil
base = self.class.all(all_queries: all_queries).preload(strict_loaded_associations)
if options && options[:lock]
base.lock(options[:lock]).find_by!(_in_memory_query_constraints_hash)
else
base.find_by!(_in_memory_query_constraints_hash)
end
end
Defined in activerecord/lib/active_record/persistence.rb line 826
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Persistence