mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Do not overwrite selected and disabled attributes
This commit is contained in:
parent
fd5739c94a
commit
be521ef6ac
1 changed files with 2 additions and 2 deletions
|
@ -360,8 +360,8 @@ module ActionView
|
|||
html_attributes = option_html_attributes(element)
|
||||
text, value = option_text_and_value(element).map { |item| item.to_s }
|
||||
|
||||
html_attributes[:selected] = option_value_selected?(value, selected)
|
||||
html_attributes[:disabled] = disabled && option_value_selected?(value, disabled)
|
||||
html_attributes[:selected] ||= option_value_selected?(value, 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