1
0
Fork 0
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:
Yves Senn 2013-11-25 02:21:57 -08:00
commit f4a5a9ea4d

View file

@ -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)