diff options
author | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2013-11-25 15:36:27 +0530 |
---|---|---|
committer | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2013-11-25 15:36:27 +0530 |
commit | 0f2ef7b929de1a6892ea1f149a3f3e8d357268ae (patch) | |
tree | 9805e44c99a87af8580dc2bdfda53481e366dde5 /actionview/lib/action_view/helpers/form_options_helper.rb | |
parent | 9b423c98118c8900ee0bc4bfcf1f8eb1ad0632d5 (diff) | |
download | rails-0f2ef7b929de1a6892ea1f149a3f3e8d357268ae.tar.gz rails-0f2ef7b929de1a6892ea1f149a3f3e8d357268ae.tar.bz2 rails-0f2ef7b929de1a6892ea1f149a3f3e8d357268ae.zip |
avoiding calling of #option_value_selected? two times
Diffstat (limited to 'actionview/lib/action_view/helpers/form_options_helper.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/form_options_helper.rb | 2 |
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 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) |