I have a simple feedback form handled by feedback_controller. For
methods I use “new” for the form and “create” to handle the feedback
submitted.
Routes are simple enough:
map.resources :feedback
What’s odd is this works fine in Rails 1.2.1:
<% form_tag(feedback_path) do -%>
But in Rails 1.2.2 and 1.2.3 I get:
feedback_url failed to generate from {:action=>“show”,
:controller=>“feedback”} - you may have ambiguous routes, or you may
need to supply additional parameters for this route. content_url has
the following required parameters: [“feedback”, :id] - are they all
satisifed?
in resource routes, you normally have a pluralized model name:
map.resource :feedbacks
the you get:
feedbacks_path
=> GET/POST /feedbacks/
(for getting a list of items or creating a new one.)
feedback_path(@feedback)
#=> GET/PUT/DELETE /feedbacks/ID_OF_GIVEN_FEEDBACK
(for getting/updateing/deleting a specific record with a given
ID)
see the difference?
feedback_path ↔ feedbackS_path
try this
<%= form_tag(feedbacks_path) %>
But also i think as your resource name is not pluralized something
gets mixed up somewhere along the way of these routing helpers, and
the error could still be there.
That it worked in 1.2.1 and not in 1.2.3 may be due to some code
changes in this area …
try pluralizing your resource name in routes.rb too.