Saturday, April 14, 2012

[Rails] 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!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/-YUOrugkGtsJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate