Cheers for the explanation, Fred.
Following your advice I passed the appropriate HTTP method to the form
in the partial and now everything works as it should.

In case it helps anyone else, I now have:

new.html.erb:
<%= render :partial => "form", :locals => {:url => {:action =>
"create"}, :method => :post} %>

edit.html.erb:
<%= render :partial => "form", :locals => {:url => {:action => "update",
:id => @flight}, :method => :put} %>

_form.html.erb:
<% form_for :flight, :url => url, :html=>{:method=> method} do |f| %>

Thanks again.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to