Anyone able to implement table column sorting and pagination with
Restful routes?
I’ll give it try and let you know what I come up with. Thanks!
On 2/5/07, Justin Ko [email protected] wrote:
Anyone able to implement table column sorting and pagination with
Restful routes?
I haven’t implemented this but I don’t see it being too difficult.
You could add a sort route to the resource’s collection methods.
Example:
map.resources :items, :collection => { :sort => :post }
Then you could pass the attribute and page numbers as simple params.
Example:
/items;sort?on=name&p=2
I’m sure there are a bunch of other ways to do it. It just depends on
how you want it to work.
Hope this helps.
–
Zack C.
http://depixelate.com