提交 b2c7d234 编写于 作者: C Carlos Antonio da Silva

Revert "Merge pull request #13027 from akshay-vishnoi/f-refactor"

This reverts commit f4a5a9ea, reversing
changes made to 7ccb4821.

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).
上级 f4a5a9ea
......@@ -361,7 +361,7 @@ def options_for_select(container, selected = nil)
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册