how to change class of a label for checkboxes in simple_form

前端 未结 6 885
说谎
说谎 2020-12-14 15:49

using simple_form we can change class of a label using:

label_html => {:class => \"myclass\"}

but how do we do the same when

6条回答
  •  天命终不由人
    2020-12-14 16:15

    The easiest way to change the label class for a checkbox is to insert the following in /config/inititializers/simple_form.rb or /config/initializers/simple_form_bootstrap.rb:

    config.boolean_label_class = 'form-check-label'
    

提交回复
热议问题