Module: FactoryGirl::Syntax::Make::ActiveRecord::ClassMethods Private

Defined in:
lib/factory_girl/syntax/make.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#make(overrides = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



29
30
31
32
# File 'lib/factory_girl/syntax/make.rb', line 29

def make(overrides = {})
  ActiveSupport::Deprecation.warn 'Model.make is deprecated; use FactoryGirl.build(:model) instead.', caller
  FactoryRunner.new(name.underscore, :build, [overrides]).run
end

#make!(overrides = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



34
35
36
37
# File 'lib/factory_girl/syntax/make.rb', line 34

def make!(overrides = {})
  ActiveSupport::Deprecation.warn 'Model.make! is deprecated; use FactoryGirl.create(:model) instead.', caller
  FactoryRunner.new(name.underscore, :create, [overrides]).run
end