Class: Fixturex::FixtureModel

Inherits:
Struct
  • Object
show all
Defined in:
lib/fixturex/tree_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fixture_pathObject

Returns the value of attribute fixture_path

Returns:

  • the current value of fixture_path



42
43
44
# File 'lib/fixturex/tree_builder.rb', line 42

def fixture_path
  @fixture_path
end

Instance Method Details

#model_classObject



43
44
45
46
47
# File 'lib/fixturex/tree_builder.rb', line 43

def model_class
  # TODO: support custom model_class from yaml
  # TODO: support (or document the limitation) `set_fixture_class my_products: Product`
  ActiveRecord::FixtureSet.default_fixture_model_name(fixture_set).constantize
end