formtastic-bootstrap
formtastic-bootstrap copied to clipboard
as: :boolean rendering wrong HTML
Inside a form:
= f.input :failed, as: :boolean
yields:
<div class="boolean input optional form-group checkbox" id="failed_input">
<span class="form-wrapper">
<input type="hidden" name="something[failed]" value="0">
<label for="transfer_failed" class=" control-label">
<input type="checkbox" name="something[failed]" id="something_failed" value="1">Failure Text</label>
</span>
</div>
Whereas I'm expecting something more like: https://github.com/twbs/bootlint/wiki/E017 which would be more like:
.checkbox
%label
%input{type: 'checkbox'} Truth
This is making it so that Bootstrap 3.x doesn't match the selector properly, and just throws the checkbox and text mashed on top of each other.
+1 Setting the label property to 'false' for the time being...
= f.input :remember_me, as: :boolean, label: false