simple_form rails form for css ruby-on-rails ruby-on-rails-3 class simple-form

rails - Dar forma a una clase CSS usando simple_form_for



rails forms select (2)

Esto es lo que he intentado, y la llamada simple_form_for ignoró mi configuración de clase.

# Rails code in view: <%= simple_form_for @admin_artist, :class => ''foobarbaz'' do |f| %> # Renders: <form accept-charset="UTF-8" action="/admin/artists" class="simple_form new_admin_artist" id="new_admin_artist" method="post" novalidate="novalidate">

¿Alguna sugerencia?


Deberías usar :html así:

<%= simple_form_for @admin_artist, :html => { role: ''form'', class: ''foobarbaz'' } do |f| %>


esto funcionaria

<%= simple_form_for @admin_artist, :html=> { class: ''foobarbaz'' } do |f| %>