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.
Peter M. (Guest)
on 2007-06-19 08: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
Daniel -. (Guest)
on 2007-06-19 08:56
(Received via mailing list)
On 6/19/07, Peter M. <removed_email_address@domain.invalid> 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.