I have a form and always seem to be sent to the wrong controller- method. Can anyone help me with this pastie (controller-, view- and routing- code present in pastie)? http://rafb.net/p/tEvsAB49.html Saludos Javier --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Javier_CH wrote:> I have a form and always seem to be sent to the wrong controller- > method. > > Can anyone help me with this pastie (controller-, view- and routing- > code present in pastie)? > > http://rafb.net/p/tEvsAB49.html > > Saludos > Javier >My guess (and that''s all it is, a guess) is that you''ve got another route that''s conflicting somehow with this one. There''s two things I would check next. 1) When viewing the form in the browser, have the browser show you the HTML source of the page and confirm that the path is set to what you think it should be. 2) check your development log right after submitting the form and check what the incoming params hash is set to for clues. -- http://www.5valleys.com/ http://www.workingwithrails.com/person/8078 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
SOLVED: I used the following line to open the form (forgot :url =>...) and now it works: <% form_for(@my_user, :url => update_email_user_path(@my_user.id), :html => {:method => :put }) do | f| -%> On Mar 12, 3:48 pm, Javier_CH <vazqu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a form and always seem to be sent to the wrong controller- > method. > > Can anyone help me with this pastie (controller-, view- and routing- > code present in pastie)? > > http://rafb.net/p/tEvsAB49.html > > Saludos > Javier--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---