aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/CHANGELOG4
-rw-r--r--actionpack/lib/action_view/helpers/form_options_helper.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 8448d657f8..be0a4f4ace 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,8 +1,10 @@
*SVN*
+* Fixed FormOptionsHelper#select to respect :selected value #5813
+
* Fixed TextHelper#simple_format to deal with multiple single returns within a single paragraph #5835 [moriq@moriq.com]
-* Fixed TextHelper#pluralize to handle 1 as a string #5905 [rails@bencurtis.com]
+* Fixed TextHelper#pluralize to handle 1 as a string #5909 [rails@bencurtis.com]
* Improved resolution of DateHelper#distance_of_time_in_words for better precision #5994 [Bob Silva]
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb
index 98c60fab5b..6b3da64f7d 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -299,7 +299,7 @@ module ActionView
add_default_name_and_id(html_options)
value = value(object)
selected_value = options.has_key?(:selected) ? options[:selected] : value
- content_tag("select", add_options(options_for_select(choices, selected_value), options, value), html_options)
+ content_tag("select", add_options(options_for_select(choices, selected_value), options, selected_value), html_options)
end
def to_collection_select_tag(collection, value_method, text_method, options, html_options)