Method: Dataset::RecordMethods#find_model

Defined in:
lib/dataset/session_binding.rb

#find_model(*args) ⇒ Object

Dataset will track each of the records it creates by symbolic name to id. When you need an instance of a record, the stored id will be used to do the fastest lookup possible: Person.find(23425234).

find_model :person, :bobby    => <#Person :id => 23425234, :name => 'Bobby'>

You may pass one name or many, with many returning an Array of instances.



141
142
143
# File 'lib/dataset/session_binding.rb', line 141

def find_model(*args)
  dataset_session_binding.find_model(*args)
end