Permalink
Browse files

Dont check for class equaity when merging relations

  • Loading branch information...
1 parent 88de6b2 commit e1d507c7fb541d29d57d152f40e3a539e70781d0 @lifo lifo committed Jan 17, 2010
@@ -15,10 +15,6 @@ def spawn(arel_table = self.table)
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
@@ -420,10 +420,6 @@ def test_relation_merging_with_preload
end
end
- def test_invalid_merge
- assert_raises(ArgumentError) { Post.scoped & Developer.scoped }
- end
-
def test_count
posts = Post.scoped

0 comments on commit e1d507c

Please sign in to comment.