#65 ✓resolved

order_by_links, and second column

Reported by Scott | March 8th, 2009 @ 05:01 AM

Thanks so much for updating the order_by_links, it works great and the sugestions for searching for something like M*A*S*H also works. I like the initializer approach, I will try that next so I can still use the keywords.

On the order_by_links, when I select the header title the list sorts as it should, but I would like for another column to have a secondary sort. For example, if I have a table of movies and I select the rating header, then all the G rated movies would be first, but I would also like the titles to be secondary sorted. Any advice?

Comments and changes to this ticket

  • Ben Johnson

    Ben Johnson March 23rd, 2009 @ 02:49 AM

    • State changed from “new” to “resolved”

    Hi Scott, sorry for teh delayed response. Yes this is easy, just pass an array of columns:

    order_by_link [:rating, :title]

    Hope that helps.

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 ยป

Provides common named scopes and object based searching.

People watching this ticket