Alex Rivera | Logout

How do you override the class name in the form_for helper?

Asked 2011-07-30T06:56:55.020
45

I need to add some class names to my form. I'm using Rails' form_for helper to do this. I've tried adding { :class => 'classname' } to no avail.

How can I add classes to this Rails helper output?

Edit
Report

1 Answer

93

Try this:

form_for @order, :html => {:class => "foo"}
answered 2011-07-30T07:01:27.220

Your Answer