Skip to content

Commit

Permalink
removing more useless code! yay!
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Sep 29, 2010
1 parent a35c8c6 commit f640af5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions activerecord/lib/active_record/relation/query_methods.rb
Expand Up @@ -176,12 +176,8 @@ def build_arel
arel = build_joins(arel, @joins_values) unless @joins_values.empty?

(@where_values - ['']).uniq.each do |where|
case where
when String
arel = arel.where(Arel.sql("(#{where})"))
else
arel = arel.where(Arel::Nodes::Grouping.new(where))
end
where = Arel.sql(where) if String === where
arel = arel.where(Arel::Nodes::Grouping.new(where))
end

arel = arel.having(*@having_values.uniq.reject{|h| h.blank?}) unless @having_values.empty?
Expand Down

0 comments on commit f640af5

Please sign in to comment.