Permalink
Browse files

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

This reverts commit f4a5a9e, reversing
changes made to 7ccb482.

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).
  • Loading branch information...
1 parent f4a5a9e commit b2c7d2345f3e862f07212635f2a144873e094521 @carlosantoniodasilva carlosantoniodasilva committed Nov 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionview/lib/action_view/helpers/form_options_helper.rb
@@ -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)

0 comments on commit b2c7d23

Please sign in to comment.