I’m using the _form.rhtml partial for both the new.rhtml and edit.rhtml
views like this:
<% if @product.cost %>
<%= text_field ‘product’, ‘cost’, :size => 5 %>
<% else %>
<%= text_field ‘product’, ‘cost’, :size => 5, :value => 0 %>
<% end %>
I couldn’t find a :defaultvalue or similar hash parameter and not sure
how I’d add an “if not nil” statement to the form helper.
If there’s proper way to do this I’d be interested to learn.
Thanks,
DAN