From d56125db95dafd29c7a4e9e533637a002a89098e Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Sat, 13 Aug 2011 12:46:13 -0500 Subject: [PATCH] Use #first instead of the soon-to-be deprecated #find(:first) http://m.onkey.org/active-record-query-interface --- lib/factory_girl/step_definitions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/factory_girl/step_definitions.rb b/lib/factory_girl/step_definitions.rb index 226e6c1..c1d945e 100644 --- a/lib/factory_girl/step_definitions.rb +++ b/lib/factory_girl/step_definitions.rb @@ -39,7 +39,7 @@ module FactoryGirlStepHelpers return unless association if attributes_hash = nested_attribute_hash - factory.build_class.find(:first, :conditions => attributes_hash.attributes(FindAttributes)) or + factory.build_class.first(:conditions => attributes_hash.attributes(FindAttributes)) or FactoryGirl.create(association.factory, attributes_hash.attributes) end end