Remote_form_for not passing element parameters

Hi, I am trying to get a remote_form_for to work, and I have it
currently making the request and updating the div etc… but when it
makes the request it is not passing the value of the collection select
in the parameters, it is only passing the id, action and controller.
Hopefully someone can tell me what I’m doing wrong.

Controller Code:

def assign_job
job = Job.find(params[:id])
job.update_attributes(params[:job])
@result = ‘Saved!’
render :partial => ‘test’

end

View Code:

  <% for job in @jobs %>
    <tr class="<%= cycle('list-line-odd', 'list-line-even') %>">

      <% remote_form_for :job, job,
                             :url => { :action => 'assign_job', :id

=> job },
:update => ‘result_’ + job.id.to_s,
:complete => visual_effect(:highlight,
‘result’) do |f| %>

<%= job.number %>
<%= job.company.name %>
<%= job.passenger_name %>
<%= job.job_time.strftime(’%H:%M’) %>
<%= %>
<%= %>
<%= f.collection_select(:driver_id, @drivers, :id,
:company_name) %>
<%= submit_tag ‘Save’ %>
<% end %> <% end %>

On Sep 17, 10:17 pm, Ash F. [email protected]
wrote:

Hi, I am trying to get a remote_form_for to work, and I have it
currently making the request and updating the div etc… but when it
makes the request it is not passing the value of the collection select
in the parameters, it is only passing the id, action and controller.
Hopefully someone can tell me what I’m doing wrong.

It would probably help if your html was valid. tr elements can only
contain th and td tags (those tags can contain forms, or you can have
forms containing a larger part of the document, but sticking a form
exactly where you’ve put it isn’t allowed.

Fred

Thanks, that worked perfectly.