Class: FactoryBot::Syntax::Default::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/fixture_bot/extension.rb

Instance Method Summary collapse

Instance Method Details

#preload(table, &block) ⇒ Object



7
8
9
10
# File 'lib/fixture_bot/extension.rb', line 7

def preload(table, &block)
  ::FixtureBot::FixtureCreator.tables[table] ||= []
  ::FixtureBot::FixtureCreator.tables[table] << block
end