-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Use include_blank value as option label #17064
Use include_blank value as option label #17064
Conversation
include_blank = '' | ||
end | ||
|
||
option_tags = content_tag(:option, '', :value => include_blank).safe_concat(option_tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value should be always empty string. Only the text that can be the include_blank
value
@rafaelfranca Thanks for pointing that out. I fixed it. |
Great! Now we will need a test to assert this behaviour and avoid regressions. |
I've added a test for it. |
@rafaelfranca Is there still something wrong? Or can this be merged? |
LGTM, before merging, can you squash all your commits in 1. so would make it easier to track back in history. thanks |
Update select_tag to reflect documentation and behave the same as form builder select. If the value of include_blank is not boolean true, use that value as the option label.
Great! In my branch I've force-pushed a merged commit. The Github interface doesn't seem to recognize this though. |
@arthurnn @rafaelfranca Is this correct now? Can it be merged? |
Use include_blank value as option label
Use include_blank value as option label
Update select_tag to reflect documentation and behave the same as form builder select. If the value of include_blank is not boolean true, use that value as the option label.