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
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
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.
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> -%>