Simple_form: Remove outer label for an inline checkbox with label

前端 未结 6 1486
盖世英雄少女心
盖世英雄少女心 2021-02-02 07:14

Using Simple_form 2.0.2

The simple form code using HAML:

= f.input :remember_me, as: :boolean, inline_label: \'Remember me\'

But it ren

6条回答
  •  感情败类
    2021-02-02 07:52

    Found a solution after much Google fu.

    Use input_field instead of input which won't automatically generate a label.

    = f.input_field :remember_me, as: :boolean, inline_label: 'Remember me'
    

提交回复
热议问题