Search code examples
ruby-on-railsruby-on-rails-3formtastic

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


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 from happening?


Solution

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