Permalink
Browse files

removing more useless code! yay!

  • Loading branch information...
1 parent a35c8c6 commit f640af5a7a4f0e4db993ee9344b5ba0e338c54ec @tenderlove tenderlove committed Sep 29, 2010
Showing with 2 additions and 6 deletions.
  1. +2 −6 activerecord/lib/active_record/relation/query_methods.rb
@@ -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?

0 comments on commit f640af5

Please sign in to comment.