I have a form field in my Rails view like this:
<%= f.text_field :date, :class => \"datepicker\" %>
A javascript function converts
SOLVED: I pass in the :value => show.date
as suggested by Jayendra above. The reason it wasn't working was because I didn't pass in the show
object from the parent view. I changed the render
line to include it - the parent view now looks like this:
<%= form_tag("/shows/update_individual", :method => "put") do %>
<% for show in @shows %>
<%= fields_for "shows[]", show do |f| %>
<%= render "fields", :f => f, :show => show %>
<% end %>
<% end %>
<%= submit_tag "Submit"%>
<% end %>