I'm working on a rails 3.2 ruby 1.9.2 project.
I get some values from database with a classic:
designators = Model.find()
And I show it in view with (simplified code):
<table class="rwy_modes_table" cellspacing='0'>
<% designators.each do |info_design| %>
<tr id="rwy_mode_<%=info_design.id%>">
<td class="spacer"><%= info_design.try(:designator) %></td>
</tr>
<% end %>
</table>
Values are for example: 3L, 3C, 3R. (L for Left, C for Center, 4 for Right). I would like values ordered such as: 3L, 3C, 3R and not 3C, 3L, 3R
I don't know how to define this custom order. Any idea ?