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

Improve disabled option to input_field #1582

Merged

Conversation

betelgeuse
Copy link
Contributor

Allows individual options to be disabled instead of just the whole
select.

Fixes #1365.

Allows individual options to be disabled instead of just the whole
select.

Fixes heartcombo#1365.
@feliperenan feliperenan merged commit 01dabba into heartcombo:master Jun 8, 2018
@doits
Copy link

doits commented Nov 29, 2018

Is it possible that with this change disabled: false is not passed down to the Tag as an option?

I have this field:

f.input_field :group, as: :hidden, disabled: false

Before, I could see the key in ActionView::Helpers::Tags::Base (see https://github.com/Stellenticket/strong_form/blob/c91f51e50083c2a95088f59ea533fef4bd2fe1fe/lib/strong_form/tag.rb#L19)

Now the key is not present anymore. Can it be that false values are filtered out now and not passed down?

@doits
Copy link

doits commented Nov 29, 2018

to be more precise: this only happens with disabled: false. With disabled: true it can be seen there (though with disabled: 'abc' it is not there, either 😕)

@tegon
Copy link
Member

tegon commented Nov 29, 2018

@doits Would you mind opening a new issue for this? It's hard to keep track of comments in closed issues and pull requests.

@doits
Copy link

doits commented Nov 29, 2018

@tegon sure will do so. Will need to find a simple test case to reproduce before, though.

@doits
Copy link

doits commented Nov 30, 2018

done with #1623

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

Successfully merging this pull request may close these issues.

4 participants