Add sorting to associations
Reported by Yurii Rashkovskii | April 29th, 2008 @ 10: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
-
Yurii Rashkovskii April 30th, 2008 @ 10:38 AM
- State changed from new to open
-
Yurii Rashkovskii April 30th, 2008 @ 10:46 AM
- State changed from open to resolved
(from [67e1af5e9563c283137fa759ecbf2778d76f0349]) Initial implementation of has_many association sorting [#26 state:resolved]
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.
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