How do I sort the outcome of my for-loop in ruby on rails
- by Angela
I have a loop as follows:
<% for email in @campaign.emails%>
<strong>Email: </strong><%=h email.title %> sent after <%=h email.days %> days </br>
<% end %>
But actually I want it sorted by the email.days value when it displays to the screen.
How do I do that?