I have this edit form.
But when I store something such as 1.5, I would like to display it as 1.50.
How could I do that with the form helper? <%= f.text_field :cost, :class => 'cost' %>
<%= f.text_field :cost, :class => 'cost' %>
Alternatively, you can use the format string "%.2f" % 1.5. http://ruby-doc.com/docs/ProgrammingRuby/#Kernel.sprintf
"%.2f" % 1.5