From ae6033331fe78cf5b3af04e1f6f930b98ddab66f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 30 Nov 2010 15:48:15 -0800 Subject: shorten up scope_for_create --- activerecord/lib/active_record/relation.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 4bc7f73013..8d0d99a125 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -327,13 +327,7 @@ module ActiveRecord end def scope_for_create - @scope_for_create ||= begin - if @create_with_value - where_values_hash.merge @create_with_value - else - where_values_hash - end - end + @scope_for_create ||= where_values_hash.merge(@create_with_value || {}) end def eager_loading? -- cgit v1.2.3