Give form a CSS class using simple_form_for

前端 未结 2 1685
春和景丽
春和景丽 2020-12-29 04:17

Here\'s what I\'ve tried, and the simple_form_for call ignored my class setting.

# Rails code in view:
<%= simple_form_for @admin_artist, :cl         


        
2条回答
  •  盖世英雄少女心
    2020-12-29 05:08

    You should use :html like this:

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

提交回复
热议问题