#26 ✓resolved
Yurii Rashkovskii

Add sorting to associations

Reported by Yurii Rashkovskii | April 29th, 2008 @ 07:24 AM | in 0.0.3

It might have a sense to add ordering to associations, something like

  has_many :comments, :sort_by => :created_at

This parameter should be used by association view to emit keys that sort accordingly to slot specified in :sort_by key.

We also need a key to specify reverse order:

  has_many :comments, :sort_by => :created_at, :reverse => true

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

StrokeDB is an embeddable distributed document database written in Ruby

Shared Ticket Bins

People watching this ticket