开发者

Formtastic Problem, boolean field automatically checks itself after reporting an error

开发者 https://www.devze.com 2023-03-08 06:51 出处:网络
Have a boolean input in a formtastic form. <%= f.input :legal, :as => :boolean, :input_html => { :checkbox_tag => false }, :label => \"I Agree to the legal terms\"%>

Have a boolean input in a formtastic form.

<%= f.input :legal, :as => :boolean, :input_html => { :checkbox_tag => false }, :label => "I Agree to the legal terms"  %>

If it isn't checked and the form is submitted, on reload (with all the error messages inline) the boolean field checks itself. How can I stop this f开发者_StackOverflow中文版rom happening?


This was a bug which has been corrected in 1.2.4 and in master.

0

精彩评论

暂无评论...
验证码 换一张
取 消