I’m a newbie and was curious about displaying scaffold views ascending
or descending by date. Here’s what my current view looks like. The
first column is the one I’d like to sort by so that the user can see
each date in order as the event date is approaching. My controller is
just the generated scaffold controller. I know that the default for
Rails is to display each record by when it was created. How can I go
about displaying this table by dates and what’s the best way to do it?
|<%=h date.date %>||<%=h date.address1 %>||<%=h date.address2 %>||<%=h date.city %>||<%=h date.state %>||<%= link_to 'Show', date %>||<%= link_to 'Edit', edit_date_path(date) %>||<%= link_to 'Destroy', date, :confirm => 'Are you sure?', :method => :delete %>|