How do I configure Ruby on Rails to output standard HTML code instead of XHTML when using helpers (form, javascript, css, etc.)?
I don't want to have the slash at the end:
<input name="email" type="text" />
How do I configure Ruby on Rails to output standard HTML code instead of XHTML when using helpers (form, javascript, css, etc.)?
I don't want to have the slash at the end:
<input name="email" type="text" />
The solution does not work with the latest version of Rails. Some helpers will override the open method argument of 'open' to 'false'.
The following works for me in Rails 2.3.5:
Put that into an initializer.
This answer is contained in the link provided by MarkusQ, but I figured I could spell it out exactly.
You have to modify the code than renders all tags, you can do that by including the following code into something like lib/dont_use_xhtml.rb
For rails
2.3
:Install the gem
haml
then add the following initializerconfig/initializers/force_html4.rb
:See http://railsforum.com/viewtopic.php?id=21941
-- MarkusQ