Why does the form give the error “Only post requests are allowed.”
when submitted to my action? I know the form is supposed to be a post.
the rake routes looks ok. some reason there is a “_method”=>“put” in
the reques parameters, would this cause it? how do i change the form
code to prevent this?
Request
Parameters:
{“commit”=>“Save”,
“_method”=>“put”,
“authenticity_token”=>“291f0f51779490f481edec3fef506b14a2797263”,
“address”=>{“address”=>“123 some street, boston, ma”}}
rake routes
verify_edit_club_address
POST
/clubs/:club_id/addresses/:id/verify_edit
{:controller=>“addresses”, :action=>“verify_edit”}
form.html.erb
<% form_for([@club, @address], :url =>
verify_edit_club_address_path(@club, @address)) do |f| -%>
Address
<%= f.text_area :address %>
<%= f.submit "Save" %>
<% end -%>html of generated form
Address
123 some street, boston, ma