From e1d507c7fb541d29d57d152f40e3a539e70781d0 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Mon, 18 Jan 2010 04:28:21 +0530 Subject: Dont check for class equaity when merging relations --- activerecord/lib/active_record/relation/spawn_methods.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index 4ac9e50f5a..d5b13c6100 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -15,10 +15,6 @@ module ActiveRecord end def merge(r) - if r.klass != @klass - raise ArgumentError, "Cannot merge a #{r.klass.name}(##{r.klass.object_id}) relation with #{@klass.name}(##{@klass.object_id}) relation" - end - merged_relation = spawn return merged_relation unless r -- cgit v1.2.3