You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 8, 2022. It is now read-only.
I don't know at what point the form helper stopped working so I'm just going to say it doesn't work on 3.0.7 as that's the version I'm running on.
I have a nested model (although I tried this with a non-nested model and got the same problem) called Employer::Question. I created a haml form for the new view and called:
= form('question')
Reloading the page threw the error that Rails couldn't find the route :action => "employer/questions", :controller => "employer/questions".
I dug into the code some and it looks like the form method is expecting url_for to return the action name ("create" for example). But it's actually returning the path for the action ("employer/questions" in my case).
seems to fix the problem but all the tests break because the overridden url_for still returns the action. I don't know how to fix the tests so I haven't sent a pull request. I'm sorry for that.
The text was updated successfully, but these errors were encountered:
I don't know at what point the form helper stopped working so I'm just going to say it doesn't work on 3.0.7 as that's the version I'm running on.
I have a nested model (although I tried this with a non-nested model and got the same problem) called
Employer::Question
. I created a haml form for thenew
view and called:= form('question')
Reloading the page threw the error that Rails couldn't find the route
:action => "employer/questions", :controller => "employer/questions"
.I dug into the code some and it looks like the
form
method is expectingurl_for
to return the action name ("create" for example). But it's actually returning the path for the action ("employer/questions" in my case).Changing the call to
form_for
to:contents = form_tag(action, :method =>(options[:method] || 'post'), :enctype => options[:multipart] ? 'multipart/form-data': nil)
seems to fix the problem but all the tests break because the overridden
url_for
still returns the action. I don't know how to fix the tests so I haven't sent a pull request. I'm sorry for that.The text was updated successfully, but these errors were encountered: