diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-12-27 23:29:38 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-12-27 23:29:41 +0530 |
commit | 08312e9958b84de9aef07ba157eed04750567da4 (patch) | |
tree | 2a6e4f0b6ff2c2e746513faa6819e4f571674e4a /activerecord/lib/active_record/relation.rb | |
parent | 5565bab994af1e54f34df5891c635590d22feea0 (diff) | |
download | rails-08312e9958b84de9aef07ba157eed04750567da4.tar.gz rails-08312e9958b84de9aef07ba157eed04750567da4.tar.bz2 rails-08312e9958b84de9aef07ba157eed04750567da4.zip |
Return a new relation when blank is supplied to relation.joins
Diffstat (limited to 'activerecord/lib/active_record/relation.rb')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 4aa460a601..d1f4dc2101 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -69,7 +69,7 @@ module ActiveRecord 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 |