diff options
Diffstat (limited to 'lib/arel/select_manager.rb')
-rw-r--r-- | lib/arel/select_manager.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index 8f5995e32c..4e1382224d 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -31,7 +31,7 @@ module Arel def where_clauses if $VERBOSE - warn "(#{caller.first}) where_clauses is deprecated and will be removed in arel 3.0.0 with no replacement" + warn "(#{caller.first}) where_clauses is deprecated and will be removed in arel 3.0.0 with no replacement" end to_sql = Visitors::ToSql.new @engine @ctx.wheres.map { |c| to_sql.accept c } @@ -135,24 +135,24 @@ module Arel end def union operation, other = nil - if operation.is_a? Symbol - node_class = Nodes.const_get("Union#{operation.to_s.capitalize}") - else - other = operation - node_class = Nodes::Union - end + if operation.is_a? Symbol + node_class = Nodes.const_get("Union#{operation.to_s.capitalize}") + else + other = operation + node_class = Nodes::Union + end - node_class.new self.ast, other.ast - end + node_class.new self.ast, other.ast + end def with *subqueries - if subqueries.first.is_a? Symbol - node_class = Nodes.const_get("With#{subqueries.shift.to_s.capitalize}") - else - node_class = Nodes::With - end - @ast.with = node_class.new(subqueries.flatten) - end + if subqueries.first.is_a? Symbol + node_class = Nodes.const_get("With#{subqueries.shift.to_s.capitalize}") + else + node_class = Nodes::With + end + @ast.with = node_class.new(subqueries.flatten) + end def take limit @ast.limit = Nodes::Limit.new(limit) |