how to change class of a label for checkboxes in simple_form

前端 未结 6 898
说谎
说谎 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:08

    You should be able to set :input_html on your form input.

    Somthing like:

    f.input :something, :as => :check_box, :input_html => { :class => "myclass" }
    

    ian.

提交回复
热议问题