1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

select manager responds to order

This commit is contained in:
Aaron Patterson 2010-09-06 17:17:49 -07:00
parent a0772a8d9c
commit e4f6272b84
2 changed files with 11 additions and 0 deletions

View file

@ -37,6 +37,10 @@ module Arel
end
end
def order *expr
tm.order *expr
end
def where condition
tm.where condition
end

View file

@ -30,6 +30,13 @@ module Arel
end
end
describe 'order' do
it "should take an order" do
manager = @relation.order "foo"
manager.to_sql.should be_like %{ SELECT FROM "users" ORDER BY foo }
end
end
describe 'take' do
it "should add a limit" do
manager = @relation.take 1