Module: ActionFactory::Helpers

Defined in:
lib/action_factory/helpers.rb

Instance Method Summary collapse

Instance Method Details

#build(factory_name, *traits, **attributes) ⇒ Object



8
9
10
# File 'lib/action_factory/helpers.rb', line 8

def build(factory_name, *traits, **attributes)
  ActionFactory::Runner.run(factory_name, *traits, strategy: :build, **attributes)
end

#create(factory_name, *traits, **attributes) ⇒ Object



12
13
14
# File 'lib/action_factory/helpers.rb', line 12

def create(factory_name, *traits, **attributes)
  ActionFactory::Runner.run(factory_name, *traits, strategy: :create, **attributes)
end