Add class to "form_for"


#1

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.


#2

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


#3

Wonderful,that works just fine.
Thank you very much indeed.


#4

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