title: rails helper function to return the most recent date
body: <p>I need to Write rails helper method to return the most recent date.</p>
  
  <p>So far this is my method</p>
  
  <pre><code>def latest_date(value_dates)
    value_dates.each  |value_date| do
    my_dates &lt;&lt; value_date
  end
  </code></pre>
  
  <p>I need to sort the above array and return just the latest date.</p>
  
  <p>The date is in the following format:</p>
  
  <pre><code>2012-10-10T22:11:52.000Z
  </code></pre>
  
  <p>Is there a sort method for date?</p>