views:

40

answers:

0

Can Rails automatically parse datetime recieved from form text_field?

  <div class="field">
    <%= f.label :created_at %><br />
    <%= f.textfield :created_at %>
  </div>

params[:product][:updated_at].yesterday

Currently i get following error:

undefined method `yesterday' for "2010-04-28 03:37:00 UTC":String