Restful table column sorting with pagination


#1

Anyone able to implement table column sorting and pagination with
Restful routes?


#2

I’ll give it try and let you know what I come up with. Thanks!


#3

On 2/5/07, Justin Ko removed_email_address@domain.invalid 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