Forum: Ruby on Rails helpers to produce HTML (not XHTML)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eea3feaacbe44706164289d068d94828?d=identicon&s=25 Peter Michaux (Guest)
on 2007-06-19 06:47
(Received via mailing list)
Hi,

In a form_for :comment block, Rails turns

<%= f.text_field :name %>

into

<input id="comment_name" name="comment[name]" size="30" type="text" />

How can I get Rails not to add the closing slash so that it is plain
HTML and not XHTML?

Thanks,
Peter
9d1f5d2d9de70bd9a934f557dc95a406?d=identicon&s=25 Daniel ----- (liquid)
on 2007-06-19 06:56
(Received via mailing list)
On 6/19/07, Peter Michaux <petermichaux@gmail.com> wrote:
> <input id="comment_name" name="comment[name]" size="30" type="text" />
>
> How can I get Rails not to add the closing slash so that it is plain
> HTML and not XHTML?
>
> Thanks,
> Peter



Isn't that valid HTML as well?  Why would you want to do this?
This topic is locked and can not be replied to.