From e8c7f1af0fe7b408688a3b260d2ba2b7ef03dd28 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 7 Sep 2010 03:32:11 -0300 Subject: unscoped has nothing so merging with a relation just returns the relation --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 47394de3c1..24bfef0a20 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -923,7 +923,7 @@ module ActiveRecord #:nodoc: end def construct_finder_arel(options = {}, scope = nil) - relation = options.is_a?(Hash) ? unscoped.apply_finder_options(options) : unscoped.merge(options) + relation = options.is_a?(Hash) ? unscoped.apply_finder_options(options) : options relation = scope.merge(relation) if scope relation end -- cgit v1.2.3