New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select_tag :grouped_options generated incorrect HTML #1294

Closed
postmodern opened this Issue May 23, 2013 · 2 comments

Comments

Projects
None yet
4 participants
@postmodern
Contributor

postmodern commented May 23, 2013

I noticed that grouped_options: generates <optgroup> tags, outside of the <select> tag.

ERB

<%= f.select :type, grouped_options: {'Category1' => [['Foo', 'foo'], ...], ....} %>

HTML

      <label class="grid_1" for="foo_type">Type: </label>
      <optgroup label="Category1"><option value="foo">Foo</option>
<option value="bar">Bar</option>
</optgroup><optgroup label="Category2"></optgroup><optgroup label="Category3"><option value="baz">Baz</option>
<option value="bax">Bax</option>
</optgroup><optgroup label="Category4"><option value="quix">Quix</option>
</optgroup><select id="foo_type" name="foo[type]">




</select>
@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE May 23, 2013

Member

mmm strange, If I reckon I used it recently in slim without problems. @nesquena ?

Member

DAddYE commented May 23, 2013

mmm strange, If I reckon I used it recently in slim without problems. @nesquena ?

@ghost ghost assigned nesquena Jul 1, 2013

namusyaka added a commit to namusyaka/padrino-framework that referenced this issue Jul 7, 2013

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Jul 8, 2013

Member

Should be fixed in #1337

Member

ujifgc commented Jul 8, 2013

Should be fixed in #1337

@ujifgc ujifgc closed this Jul 8, 2013

deni64k added a commit to deni64k/padrino-framework that referenced this issue Jul 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment