Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In this example, it seems like it could be an issue that you take everything and then only use the first 10, instead of only taking the first 10 to begin with. Is there a way to not make it take them all, like putting the limit parameter in where()?


Rails doesn't execute the query until you actually use it in some way, by which point it knows you've added a limit clause.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: