How do you sort by earliest date?
I tried .sort and I get
<td><%= effort.week_commencing.sort %></td>
// => undefined method `sort' for Mon, 12 Sep 2011:Date
The values are not in an array they are listed in a table.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
sortmethod only on array’s.I don’t think
effort.week_commencingis returning an array in your case.check what are you getting in effort.week_commencing.