Forum: Ruby on Rails Add class to "form_for"

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.
Cb880dd8c8c209924ebb57edbb4fcd06?d=identicon&s=25 Jim Burgess (jim_in_germany)
on 2009-05-07 08:45
Hi,
How can I add a class to a form generated thus:
<% form_for :applicant, :url=> {:action => "index"} do |f| %>
I tried:
<% form_for :applicant, :url=> {:action => "index"}, :class => 'test' do
|f| %>
but this didn't work.
Thanks for your help.
7e35ecb8cb04c4c15cf0ad1a0edf113d?d=identicon&s=25 anton effendi (Guest)
on 2009-05-07 09:17
(Received via mailing list)
This is
<% form_for :applicant, :url=> {:action => "index"},:html => { :class =>
'test' }  do


Thx


On Thu, May 7, 2009 at 1:45 PM, Jim Burgess <
rails-mailing-list@andreas-s.net> wrote:

> Posted via http://www.ruby-forum.com/.
>
> >
>


--
Wu You Duan
Cb880dd8c8c209924ebb57edbb4fcd06?d=identicon&s=25 Jim Burgess (jim_in_germany)
on 2009-05-07 09:50
Wonderful,that works just fine.
Thank you very much indeed.
7e35ecb8cb04c4c15cf0ad1a0edf113d?d=identicon&s=25 anton effendi (Guest)
on 2009-05-07 15:49
(Received via mailing list)
your welcome....


On Thu, May 7, 2009 at 2:50 PM, Jim Burgess <
rails-mailing-list@andreas-s.net> wrote:

>
> Wonderful,that works just fine.
> Thank you very much indeed.
>
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


--
Wu You Duan
This topic is locked and can not be replied to.