I'm just trying out some stuff and I found something interesting, when I try to pass a string argument to the limit method I get an error.
Here is an example :
User.where('id > 10000').limit('ALL')
The error thrown is :
ArgumentError: invalid value for Integer(): "ALL"
This works of course :
User.where('id > 10000').limit(5)
But according to postgresql docs, should be possible to pass the ALL as a limit : http://www.postgresql.org/docs/8.1/static/queries-limit.html
And works on simple query from pgadmin that I tried :
select id from users limit ALL
Is there a workaround for rails with this error?