Skip to content
This repository has been archived by the owner on Oct 12, 2019. It is now read-only.

as: :boolean rendering wrong HTML #128

Open
tibbon opened this issue Jul 8, 2015 · 2 comments
Open

as: :boolean rendering wrong HTML #128

tibbon opened this issue Jul 8, 2015 · 2 comments

Comments

@tibbon
Copy link
Contributor

tibbon commented Jul 8, 2015

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
@tibbon
Copy link
Contributor Author

tibbon commented Jul 8, 2015

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.

@wintondeshong
Copy link

+1 Setting the label property to 'false' for the time being...

= f.input :remember_me, as: :boolean, label: false

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants