On 10 May 2011 00:43, Brett Turner
<brettturner.h-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> How would I go about showing the most recent database entry first then
> to the next most recent.... currently it is shown in chronological
> order
When you do the find that gets the records (in the controller index
action normally) just add an order clause to the search. See the
Rails Guide, Active Record Query Interface, on how to do it. If you
want *always* to sort this model in that order then do it in a
default_scope method in the model.
Colin
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.