aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorVasiliy Ermolovich <younash@gmail.com>2013-06-16 17:39:03 +0300
committerVasiliy Ermolovich <younash@gmail.com>2013-06-16 17:58:34 +0300
commit782cee5377dda1f8f0f84988c3959a06aa884d95 (patch)
treec9b954ec5da7c225e65992f83f5e33af4ac59419 /actionpack/lib/action_view
parent76462a8543b7feac6b2957cf2c0724b30775c3c7 (diff)
downloadrails-782cee5377dda1f8f0f84988c3959a06aa884d95.tar.gz
rails-782cee5377dda1f8f0f84988c3959a06aa884d95.tar.bz2
rails-782cee5377dda1f8f0f84988c3959a06aa884d95.zip
collection tags accept html attributes as the last element of collection
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/tags/collection_helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/collection_helpers.rb b/actionpack/lib/action_view/helpers/tags/collection_helpers.rb
index cd12ddaf65..388dcf1f13 100644
--- a/actionpack/lib/action_view/helpers/tags/collection_helpers.rb
+++ b/actionpack/lib/action_view/helpers/tags/collection_helpers.rb
@@ -73,8 +73,9 @@ module ActionView
value = value_for_collection(item, @value_method)
text = value_for_collection(item, @text_method)
default_html_options = default_html_options_for_collection(item, value)
+ additional_html_options = option_html_attributes(item)
- yield item, value, text, default_html_options
+ yield item, value, text, default_html_options.merge(additional_html_options)
end.join.html_safe
end
end