Carlos Antonio, you are right! I didn't realize that because the documentation of the method still includes the old format (with the wrapping <div>s).
I created a PR to update the documentation accordingly: http://github.com/rails/rails/pull/17001 Thanks On Sunday, September 21, 2014 3:56:18 PM UTC-7, Carlos Antonio da Silva wrote: > > I believe this has been added to Rails 4.2/master already: > https://github.com/rails/rails/commit/89ff1f82f01bd70e12ec1b45049be30ac262df30 > > Cheers. > > On Sun, Sep 21, 2014 at 7:48 PM, Claudio B. <clau...@gmail.com > <javascript:>> wrote: > >> Hello Rails team, and thanks for your amazing work! >> >> I would like to create a Pull Request so that form helpers do not add an >> extra <div> inside the <form> tag. >> >> I looked back in the history of the code, and I found that the <div> was >> initially added after this discussion of 2006 >> <https://groups.google.com/forum/#%21searchin/rubyonrails-core/hidden$20method$20tag$20should/rubyonrails-core/o7eHdDT4WPg/0ddlr27rdMoJ> >> >> to make forms [x]HTML4 Strict-compliant. >> >> Another message from 2007 >> <https://groups.google.com/forum/#%21searchin/rubyonrails-core/hidden$20field$20and$20wrapping/rubyonrails-core/3TwPS3QBe8g/-CUGT-Ug5a8J> >> >> confirmed the reason why behind the <div>. >> >> Now it's 2014, and HTML 5 finally allows <form> elements to include >> <input> elements directly, without a wrapping div. >> >> What is your opinion? Should I go on and submit a pull request? >> >> Also… how concerned are you about backward compatibility? >> If you think it's appropriate, I could add a new boolean option to >> "form_for", "button_to"… so people can decide if they want the <div> or not. >> >> Thanks! >> http://github.com/claudiob >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to rubyonrails-co...@googlegroups.com <javascript:>. >> To post to this group, send email to rubyonra...@googlegroups.com >> <javascript:>. >> Visit this group at http://groups.google.com/group/rubyonrails-core. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > At. > Carlos Antonio > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.