This project is archived and is in readonly mode.
named_scope drops :limit option
-
Tekin
Here's a failing test
-
Tekin
I've just noticed that you can use .first to get a subset of results, but this does not limit at the database level:
Product.most_ordered.first(3)
will hit the dabase for all products before returning the first three.
-
Tekin
OK, my mistake, to get the desired effect, you have to do:
Product.most_ordered.all(:limit => 3)
invalid ticket...
-
Pratik
- State changed from new to invalid
- Tag set to activerecord, bug, named_scope, tested