diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-08 15:34:03 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-08 15:34:03 -0700 |
commit | 4ccf491ec2a09b22827f2c9ba99e311ce18c93eb (patch) | |
tree | 1ddfd4ae5cb9977b71e65f33d25425a852dc5007 /activerecord/lib/active_record/relation | |
parent | 86384b3c4b8443f210547094e3e35376240984eb (diff) | |
download | rails-4ccf491ec2a09b22827f2c9ba99e311ce18c93eb.tar.gz rails-4ccf491ec2a09b22827f2c9ba99e311ce18c93eb.tar.bz2 rails-4ccf491ec2a09b22827f2c9ba99e311ce18c93eb.zip |
drying up joins()
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 69724ebeeb..038b18079d 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -63,10 +63,8 @@ module ActiveRecord def joins(*args) relation = clone - if args.present? - args.flatten! - relation.joins_values += args if args.present? - end + args.flatten! + relation.joins_values += args unless args.blank? relation end |