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

check checkboxes with array of strings as :checked option #6176

Merged
merged 1 commit into from May 5, 2012

Conversation

nashby
Copy link
Contributor

@nashby nashby commented May 5, 2012

common use-case when you are passing params as :checked option:

:checked => params[:contact_ids]

in this case params[:contact_ids] is an array of strings so you should convert it with to_i if you want this work.

@rafaelfranca
Copy link
Member

cc @carlosantoniodasilva

@carlosantoniodasilva
Copy link
Member

I think this is a quite common use case, I've already been caught by values not being strings, and I can't think of any possible issue it could cause. 👍

As a side note, if this goes in we could probably port to SimpleForm :)

josevalim added a commit that referenced this pull request May 5, 2012
check checkboxes with array of strings as :checked option
@josevalim josevalim merged commit f54a35c into rails:master May 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants