Method: Dataset::RecordMethods#name_model
- Defined in:
- lib/dataset/session_binding.rb
#name_model(*args) ⇒ Object
This is a great help when you want to create records in a custom helper method, then make it and maybe things associated to it available to tests through the Dataset::ModelFinders.
thingy = create_very_complex_thingy_and_stuff
name_model thingy, :thingy_bob
name_model thingy.part, :thingy_part
In tests:
thingies(:thingy_bob)
parts(:thingy_part)
158 159 160 |
# File 'lib/dataset/session_binding.rb', line 158 def name_model(*args) dataset_session_binding.name_model(*args) end |