Skip to content

Commit

Permalink
Merge pull request #370 from arthurnn/dont_quote_limit
Browse files Browse the repository at this point in the history
Dont need to quote limit
  • Loading branch information
tenderlove committed Jun 18, 2015
2 parents 7442623 + 9669222 commit 2d19f7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/arel/select_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def initialize_copy other
end

def limit
@ast.limit && @ast.limit.expr.expr
@ast.limit && @ast.limit.expr
end
alias :taken :limit

Expand Down Expand Up @@ -216,8 +216,8 @@ def with *subqueries

def take limit
if limit
@ast.limit = Nodes::Limit.new(Nodes.build_quoted(limit))
@ctx.top = Nodes::Top.new(Nodes.build_quoted(limit))
@ast.limit = Nodes::Limit.new(limit)
@ctx.top = Nodes::Top.new(limit)
else
@ast.limit = nil
@ctx.top = nil
Expand Down

0 comments on commit 2d19f7a

Please sign in to comment.