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.
Jim B. (Guest)
on 2009-05-07 10: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.
anton effendi (Guest)
on 2009-05-07 11: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 B. <
removed_email_address@domain.invalid> wrote:

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


--
Wu You Duan
Jim B. (Guest)
on 2009-05-07 11:50
Wonderful,that works just fine.
Thank you very much indeed.
anton effendi (Guest)
on 2009-05-07 17:49
(Received via mailing list)
your welcome....


On Thu, May 7, 2009 at 2:50 PM, Jim B. <
removed_email_address@domain.invalid> 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.