Commit b3b960b

Stephen Peasley <stephenpeasley@hotmail.com>
2013-06-23 06:40:31
Sorted records by name
1 parent 347ca68
Changed files (1)
app
views
neighbourhoods
app/views/neighbourhoods/index.html.erb
@@ -9,7 +9,7 @@
         </tr>
       </thead>
       <tbody>
-      <% @neighbourhoods.each do |neighbourhood| %>
+      <% @neighbourhoods.sort { |a,b| a.name <=> b.name }.each do |neighbourhood| %>
       <tr>
         <td><%= neighbourhood.name %></td>
         <td class="<%= css_class_for(neighbourhood) %>"><%= neighbourhood.status %></td>