Andre Bonkowski
2006-Nov-04 02:25 UTC
[Rails] Controller don''t receives form parameters using form_remote_for
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 for_for to
form_remote_for I only receive this:
Parameters: {"period"=>"3",
"action"=>"new",
"controller"=>"period"}
Does anyone see what I''m missing here?
Thanks, Andr?
--
Posted with http://DevLists.com. Sign up and save your mailbox.
