Skip to content
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

collection can't handle symbols #33

Closed
aaronchi opened this issue Aug 3, 2010 · 2 comments
Closed

collection can't handle symbols #33

aaronchi opened this issue Aug 3, 2010 · 2 comments

Comments

@aaronchi
Copy link
Contributor

aaronchi commented Aug 3, 2010

When specifying a collection to select, if the collection is an array of symbols, the form will generate ids for the symbol instead of using the string:

<%= f.input :gender, :as => :select, :collection => [:male, :female], :include_blank => false %>

<select name="user[gender]" id="user_gender" class="select optional">
    <option value="1637780">male</option>
    <option value="1637876">female</option>
</select>
@carlosantoniodasilva
Copy link
Member

Could you provide a patch with tests for this?
You're probably gonna have to change here just to accept symbols:
http://github.com/plataformatec/simple_form/blob/master/lib/simple_form/inputs/collection_input.rb#L49
Thanks.

@carlosantoniodasilva
Copy link
Member

Allow collection input to accept a collection of symbols, closed by cf99793

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants