set_fixture_class

set_fixture_class(class_names = {})
Instance Public methods

Sets the model class for a fixture when the class name cannot be inferred from the fixture name.

Examples:

1
2
set_fixture_class some_fixture:        SomeModel,
                  'namespaced/fixture' => Another::Model

The keys must be the fixture names, that coincide with the short paths to the fixture files.

doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.