Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ensure our clauses are arrays before calling last

  • Loading branch information...
commit e121534b09e8e40a8b80c1832fc814aa6f7bd5b2 1 parent e715bda
@defunkt authored
View
4 adapters/ambitious_activerecord/lib/ambition/adapters/active_record/query.rb
@@ -24,11 +24,11 @@ def to_hash
hash[:order] = order.join(', ')
end
- if clauses[:slice].last =~ /LIMIT (\d+)/
+ if Array(clauses[:slice]).last =~ /LIMIT (\d+)/
hash[:limit] = $1.to_i
end
- if clauses[:slice].last =~ /OFFSET (\d+)/
+ if Array(clauses[:slice]).last =~ /OFFSET (\d+)/
hash[:offset] = $1.to_i
end
Please sign in to comment.
Something went wrong with that request. Please try again.