Hi.
I'm having a problem that I am sure there is a simple solution for, but I can't see it.
I have the following partial:
<% form_for :time_entry, TimeEntry.new, :url => hash_for_time_entries_url(:period => @period, :action => 'new'), :html => { :id => 'time-entry-form' } do |f| %> <table border="0" cellspacing="0" cellpadding="5" width="100%"> <tr> <td><label for="time_entry_hours">Timer:</label></td> <td><%= f.text_field('hours', :size => 4, :value => entry.hours) -%></td> <td><label for="time_entry_decription">Beskrivelse:</label></td> <td><%= f.text_field('description', :size => 40, :value => entry.description)-%></td> <td id='submit'> <%= submit_tag 'Lagre' %></td> </tr> </table> <% end %>
On submit I receive: Parameters: {"time_entry"=>{"description"=>"Test", "hours"=>"10"}, "commit"=>"Lagre", "period"=>"3", "action"=>"new", "controller"=>"period"} as I expected but when changing the form_for to form_remote_for I only receive this:
Parameters: {"period"=>"3", "action"=>"new", "controller"=>"period"}
Does anyone have a clue what I am missing here?
Thanks, Andrè