aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-16 14:02:14 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-16 14:02:14 -0700
commit169273227184f3bc1fc85ba61f76cbedfcfb3338 (patch)
treecb1db63eec79e993c4e863e113e30fda7dcd90a0 /actionpack/lib/action_view/helpers
parentef7a48df7584b038c6e3e0f1dbca5749310ef9f6 (diff)
parent0778290b57433da3bcd707fce222b8f646b7de4f (diff)
downloadrails-169273227184f3bc1fc85ba61f76cbedfcfb3338.tar.gz
rails-169273227184f3bc1fc85ba61f76cbedfcfb3338.tar.bz2
rails-169273227184f3bc1fc85ba61f76cbedfcfb3338.zip
Merge pull request #10173 from nashby/element-attributes
options_from_collection_for_select helper takes html attributes
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-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 7e65ebb4e4..719c9c09b5 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -380,7 +380,7 @@ module ActionView
# should produce the desired results.
def options_from_collection_for_select(collection, value_method, text_method, selected = nil)
options = collection.map do |element|
- [value_for_collection(element, text_method), value_for_collection(element, value_method)]
+ [value_for_collection(element, text_method), value_for_collection(element, value_method), option_html_attributes(element)]
end
selected, disabled = extract_selected_and_disabled(selected)
select_deselect = {