How to implement sory-by links?

Hello people.

I have an app which lists Offers from different Vendors.

I want to implement “sort by” links and I’ll do this using scopes in my
Offer model. But how should I implement the functionality in the
controllers/router? Should I use a member route along with a new
controller
action (eg. “expiring”, or “most_expensive”) or just use param queries?

My app: https://github.com/Agis-/ehm

Thanks in advance!

On 14 April 2012 15:15, Agis A. [email protected] wrote:

Hello people.

I have an app which lists Offers from different Vendors.

I want to implement “sort by” links and I’ll do this using scopes in my
Offer model.But how should I implement the functionality in the
controllers/router? Should I use a member route along with a new controller
action (eg. “expiring”, or “most_expensive”) or just use param queries?

Whichever you feel most comfortable with.

Colin

i remember that there was a jquery plugin that could do this.

2012/4/14 Colin L. [email protected]

For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


*Ըϲͬ!

ʯҾ
ϢѧԺ ϵӦ÷
Dalian NEUSOFT Institute of Information
й-԰·8
ʱࣺ116023
*Mail:[email protected] [email protected]
Phone:15242613529