aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-09-04 19:35:18 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-09-04 19:35:18 +0000
commit4c966a07a1f8d33290e2374066ccae392d74db41 (patch)
tree969829f36b0b6451b4f53c6961d1b18182756622 /actionpack/lib/action_view
parentd4bb22b2201c1ece5dcbec7859e5e3039f9b2ec2 (diff)
downloadrails-4c966a07a1f8d33290e2374066ccae392d74db41.tar.gz
rails-4c966a07a1f8d33290e2374066ccae392d74db41.tar.bz2
rails-4c966a07a1f8d33290e2374066ccae392d74db41.zip
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
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/form_options_helper.rb2
1 files changed, 1 insertions, 1 deletions
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)