diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-10 14:02:14 -0800 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2010-12-16 01:49:27 +0530 |
commit | cea73f82ad65bf8bca707f6f8f3afd86f3e82bdb (patch) | |
tree | 9f75267ac16ef21853b65e4a976c073e35005604 /activerecord | |
parent | e9732c75a819bd36ae6a47dd2b19f6cb0db4d238 (diff) | |
download | rails-cea73f82ad65bf8bca707f6f8f3afd86f3e82bdb.tar.gz rails-cea73f82ad65bf8bca707f6f8f3afd86f3e82bdb.tar.bz2 rails-cea73f82ad65bf8bca707f6f8f3afd86f3e82bdb.zip |
just mutate the ast, fewer lasgns
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 08b61c9752..dce9ac4808 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -225,14 +225,13 @@ module ActiveRecord test = eqls.inject(eqls.shift) do |memo, expr| memo.or(expr) end - arel = arel.where(test) + arel.where(test) end (wheres - equalities).each do |where| where = Arel.sql(where) if String === where - arel = arel.where(Arel::Nodes::Grouping.new(where)) + arel.where(Arel::Nodes::Grouping.new(where)) end - arel end def build_where(opts, other = []) |