Ian H Stewart wrote:> My end user would like a report on a single page that he can select
> the header field and sort by that.
Wouldn''t you just need to construct an "order by" clause and
use that
when you find the records?
@users = User.find(:all, :order => "state, points DESC")
I might even suggest updating the list through AJAX, but that''s not
required if you don''t mind a page refresh when selecting sorting
controls. You''ll, of course, need to keep track of the storing state
between requests, which you could do using the session, or any number of
others common techniques.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---