mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #13027 from akshay-vishnoi/f-refactor
avoiding calling of #option_value_selected? two times
This commit is contained in:
commit
f4a5a9ea4d
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 && option_value_selected?(value, disabled)
|
||||
html_attributes[:disabled] = disabled && html_attributes[:selected]
|
||||
html_attributes[:value] = value
|
||||
|
||||
content_tag_string(:option, text, html_attributes)
|
||||
|
|
Loading…
Reference in a new issue