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? Any idea why? Thanks!! -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
in resource routes, you normally have a pluralized model name: map.resource :feedbacks the you get: 1) feedbacks_path # => GET/POST /feedbacks/ (for getting a list of items or creating a new one.) 2) 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. On 28 Jun., 06:22, Carl Johnson <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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? > > Any idea why? > > Thanks!! > > -- > Posted viahttp://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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thorsten wrote:> in resource routes, you normally have a pluralized model name: > > map.resource :feedbacks > > the you get: > 1) feedbacks_path > # => GET/POST /feedbacks/ > (for getting a list of items or creating a new one.)Ah OK. Yeah, I was trying to make my English too proper! I changed the naming to "feedbacks" in all the relevant places and it is working now. Now I just need to figure out how to make the URL a little prettier (/feedback/new instead of /feedbacks/new)... -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---