mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Merge pull request #13027 from akshay-vishnoi/f-refactor"
This reverts commitf4a5a9ea4d
, reversing changes made to7ccb482181
. Reason: The logic is different, the first call to #option_value_selected? is for the :selected option (the argument is the "selected" variable), the second call is for the :disabled option (the argument is the "disabled" variable).
This commit is contained in:
parent
f4a5a9ea4d
commit
b2c7d2345f
1 changed files with 1 additions and 1 deletions
|
@ -361,7 +361,7 @@ module ActionView
|
|||
text, value = option_text_and_value(element).map { |item| item.to_s }
|
||||
|
||||
html_attributes[:selected] = option_value_selected?(value, selected)
|
||||
html_attributes[:disabled] = disabled && html_attributes[:selected]
|
||||
html_attributes[:disabled] = disabled && option_value_selected?(value, disabled)
|
||||
html_attributes[:value] = value
|
||||
|
||||
content_tag_string(:option, text, html_attributes)
|
||||
|
|
Loading…
Reference in a new issue