aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-11-25 09:32:32 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-11-25 09:32:32 -0200
commitb2c7d2345f3e862f07212635f2a144873e094521 (patch)
treecfc687a56e62b26875e9465785bf402d52107e80 /actionview
parentf4a5a9ea4d183f4102796215d4502c46dbe3e52b (diff)
downloadrails-b2c7d2345f3e862f07212635f2a144873e094521.tar.gz
rails-b2c7d2345f3e862f07212635f2a144873e094521.tar.bz2
rails-b2c7d2345f3e862f07212635f2a144873e094521.zip
Revert "Merge pull request #13027 from akshay-vishnoi/f-refactor"
This reverts commit f4a5a9ea4d183f4102796215d4502c46dbe3e52b, reversing changes made to 7ccb482181ee6c47c765406009018a15172812de. 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).
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/form_options_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb
index 3e54d2daaa..4347983bad 100644
--- a/actionview/lib/action_view/helpers/form_options_helper.rb
+++ b/actionview/lib/action_view/helpers/form_options_helper.rb
@@ -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 && html_attributes[:selected]
+ html_attributes[:disabled] = disabled && option_value_selected?(value, disabled)
html_attributes[:value] = value
content_tag_string(:option, text, html_attributes)