Use Rails’ form_for but set custom classes, attributes on <form> element?
Rails 4.0.3, Ruby 2.1.0p0 -> this worked for me =>
<%= form_for(@contact, :html => {:class => 'form_height'}) do |f| %><% if @contact.errors.any? %>
Use the :html
hash:
= form_for @user, :html => {:class => 'x', 'data-bar' => 'baz'} do |f|
Or
= form_for @user, html: {class: 'x', data: { bar: 'baz' } } do |f|