Permalink
Browse files

Fixed FormOptionsHelper#select to respect :selected value (closes #5813)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4995 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Sep 4, 2006
1 parent d4bb22b commit 4c966a07a1f8d33290e2374066ccae392d74db41
Showing with 4 additions and 2 deletions.
  1. +3 −1 actionpack/CHANGELOG
  2. +1 −1 actionpack/lib/action_view/helpers/form_options_helper.rb
View
@@ -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]
@@ -299,7 +299,7 @@ def to_select_tag(choices, options, html_options)
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)

0 comments on commit 4c966a0

Please sign in to comment.