form and form_for produce wrong html if used from PartController
Reported by Alexander Mankuta | August 28th, 2008 @ 09:45 PM | in 0.9.7
When used in part view form and form_for helpers produce wrong output.
For example, this code:
<%= form :action => url(:controller => 'home', :action => 'index') do %>
<%= text_area :name => 'message' %>
<%= submit 'Sumbit' %>
<% end =%>
Produces:
<textarea name="message"></textarea>
<input type="submit" value="Sumbit" name="submit"/>
<form method="post" action="/home/index"></form>
Comments and changes to this ticket
-
Bryan Ray August 29th, 2008 @ 05:41 AM
I've not been able to recreate this issue. Are you sure there's not something funky going on with your app behind the scenes?
Here's what I have
<%= form :action => url(:controller => 'main', :action => 'index') do %> <%= text_area :name => 'message' %> <%= submit "Submit" %> <% end =%><form method="post" action="/main/index"> <textarea name="message"></textarea> <input type="submit" value="Submit" name="submit"/> </form> -
Alexander Mankuta August 29th, 2008 @ 11:40 AM
Here is a frozen app that shows this behavior.
Look into http://localhost:4000/
-
Michael Klishin (antares) August 29th, 2008 @ 12:16 PM
- → Milestone changed from to 0.9.6
- → State changed from new to open
- → Assigned user changed from to Michael Klishin (antares)
Part controller should just use the same means for rendering as web controller. I'll do some investigation, thanks for attachment.
-
Michael Klishin (antares) September 9th, 2008 @ 02:22 AM
- → Milestone changed from 0.9.6 to 0.9.7
-
Bryan Ray September 9th, 2008 @ 02:32 AM
- → State changed from open to resolved
- → Assigned user changed from Michael Klishin (antares) to Bryan Ray
Thanks for pointing it out and providing the sample frozen app, Alexander.
It's been fixed in HEAD now and the commit is located here: http://github.com/wycats/merb-pl...
-
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
