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
1 changed files with 1 additions and 1 deletions

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)