On Thu, Mar 18, 2010 at 2:07 AM, Jeremy Evans <[email protected]> wrote: > On Mar 17, 7:36 pm, rohit <[email protected]> wrote: >> With group_and_count I usually want ordering by count descending. Is >> it easy to support asc, desc, and none? > > I'm thinking of changing it so that group_and_count does not modify > the dataset's order. Currently, it sets the order to count > descending, which is a common desire, but not an exclusive one. Since > group_and_count returns a modified dataset, it's easy to chain it with > order: > > dataset.group_and_count(:column).order(:count.desc) >
+1 and principle of least surprise. Michael -- http://ramblings.gibberishcode.net -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
