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



46
47
48
# File 'lib/fixturex/tree_builder.rb', line 46

def fixture_path
  @fixture_path
end

Instance Method Details

#model_classObject



47
48
49
50
51
# File 'lib/fixturex/tree_builder.rb', line 47

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