Browse files

Return a new relation when blank is supplied to relation.joins

  • Loading branch information...
1 parent 5565bab commit 08312e9958b84de9aef07ba157eed04750567da4 @lifo lifo committed Dec 27, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/relation.rb
View
2 activerecord/lib/active_record/relation.rb
@@ -69,7 +69,7 @@ def on(join)
end
def joins(join, join_type = nil)
- return self if join.blank?
+ return create_new_relation if join.blank?
join_relation = case join
when String

0 comments on commit 08312e9

Please sign in to comment.