rwz/twitter_bootstrap_form_for — comment on commit 12c8ab4e8dd320104587c7b0c1143e88a94bdc04
File:  line 0
By rwz:

Yes, i've tried removing ```for``` in my previous pull request, but it didn't work cause rails actually generates two inputs.

```
= form.toggles do
= form.check_box :attribute_name, 'Label Text'
```
generates html like this:

```

Label Text

```

Because of two inputs inside a label we need ```for``` attribute here, cause it doesn't work without it.

Its different from radiobuttons, where this code:

```
= form.toggles do
= form.radio_button :attribute_name, 'Label Text', :value
```
generates html like this:

```

Label Text

```

Notice that ```id``` attribute in radio input contains parameterized value. That is to ensure different ids for cases, where radio inputs provides different values for the same attributes.

So, we actually need ```for`` for checkboxes and do not need it for radiobuttons.