Deprecated the default strategy option

This commit is contained in:
Joe Ferris 2011-01-19 19:26:27 -05:00
parent 18c562a1e6
commit fc6d1b30b1
1 changed files with 5 additions and 1 deletions

View File

@ -182,7 +182,11 @@ module FactoryGirl
unless invalid_keys == []
raise ArgumentError, "Unknown arguments: #{invalid_keys.inspect}"
end
assert_valid_strategy(options[:default_strategy]) if options[:default_strategy]
if options[:default_strategy]
assert_valid_strategy(options[:default_strategy])
puts "WARNING: default_strategy is deprecated."
puts "Override to_create if you need to prevent a call to #save!."
end
end
def assert_valid_strategy(strategy)