Is there an easy way to format the display of a DateTime
value in a Rails view?
For example, if I\'m doing something like:
<%= text_field
I can think of three ways:
1) Creating a new method on the model that would format your date however you need it to be
2) Creating a helper method that would do the same
3) Have you tried doing:
<%= text_field
:my_object,
:start_date,
:value => @my_object.try(:start_date).try(:strftime,'%m/%d/%Y') %>