Method: Mongoid::Factory#execute_from_db
- Defined in:
- lib/mongoid/factory.rb
#execute_from_db(klass, attributes = nil, criteria = nil, selected_fields = nil, execute_callbacks: Threaded.execute_callbacks?) ⇒ Document
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Execute from_db.
234 235 236 237 238 239 |
# File 'lib/mongoid/factory.rb', line 234 def execute_from_db(klass, attributes = nil, criteria = nil, selected_fields = nil, execute_callbacks: Threaded.execute_callbacks?) Instantiator.new(klass, attributes, criteria, selected_fields) .instance(execute_callbacks: execute_callbacks) end |