From 0f2ef7b929de1a6892ea1f149a3f3e8d357268ae Mon Sep 17 00:00:00 2001
From: Akshay Vishnoi <akshay.vishnoi@vinsol.com>
Date: Mon, 25 Nov 2013 15:36:27 +0530
Subject: avoiding calling of #option_value_selected? two times

---
 actionview/lib/action_view/helpers/form_options_helper.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/actionview/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb
index 4347983bad..3e54d2daaa 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 && option_value_selected?(value, disabled)
+          html_attributes[:disabled] = disabled && html_attributes[:selected]
           html_attributes[:value] = value
 
           content_tag_string(:option, text, html_attributes)
-- 
cgit v1.2.3