aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/spawn_methods.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-18 04:28:21 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-18 04:28:21 +0530
commite1d507c7fb541d29d57d152f40e3a539e70781d0 (patch)
tree6ccd51984c6dbb8aac491f424f8d4c555184ec58 /activerecord/lib/active_record/relation/spawn_methods.rb
parent88de6b2de2606e141483ff90323c5f3ec0cfb298 (diff)
downloadrails-e1d507c7fb541d29d57d152f40e3a539e70781d0.tar.gz
rails-e1d507c7fb541d29d57d152f40e3a539e70781d0.tar.bz2
rails-e1d507c7fb541d29d57d152f40e3a539e70781d0.zip
Dont check for class equaity when merging relations
Diffstat (limited to 'activerecord/lib/active_record/relation/spawn_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/spawn_methods.rb4
1 files changed, 0 insertions, 4 deletions
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