Here's the code as I have it now in my list.rhtml:
<table>
<% for recipe in @recipes %>
<tr>
<td><h3><%= link_to h(recipe.title), :action => 'show', :id =>
recipe %></h3>
<p><%= h(recipe.description) %></p>
</td>
<td>
<%= link_to 'Edit', :action => 'edit', :id => recipe %><br />
<%= link_to 'Delete', :action => 'destroy', :id => recipe %>
</td>
</tr>
<% end %>
</table>
--
Posted via http://www.ruby-forum.com/.
<% for recipe in @recipes.sort{|a,b| a.title <=> b.title } %>
In your controller, change the line that looks like this:
@recipes = Recipe.find(:all, .....)
to include as an argument:
:order => 'title'
That should do it.