aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/tags/collection_helpers.rb
diff options
context:
space:
mode:
authorAndriel Nuernberg <andriel.nuernberg@plataformatec.com.br>2013-12-01 04:50:21 -0200
committerAndriel Nuernberg <andriel.nuernberg@plataformatec.com.br>2013-12-05 20:27:38 -0200
commitec19c77ca570919a78efcf2a801863e0eefe98c3 (patch)
tree2417a41c2bd7d0bf0c38a53701e49d2cb1d1d6e8 /actionview/lib/action_view/helpers/tags/collection_helpers.rb
parentb372690b786c639d17a5e4c1d40459fbed89f878 (diff)
downloadrails-ec19c77ca570919a78efcf2a801863e0eefe98c3.tar.gz
rails-ec19c77ca570919a78efcf2a801863e0eefe98c3.tar.bz2
rails-ec19c77ca570919a78efcf2a801863e0eefe98c3.zip
Label only accepts `:index` and `:namespace` attributes from the input
Diffstat (limited to 'actionview/lib/action_view/helpers/tags/collection_helpers.rb')
-rw-r--r--actionview/lib/action_view/helpers/tags/collection_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/tags/collection_helpers.rb b/actionview/lib/action_view/helpers/tags/collection_helpers.rb
index 787039c82e..991f32cea2 100644
--- a/actionview/lib/action_view/helpers/tags/collection_helpers.rb
+++ b/actionview/lib/action_view/helpers/tags/collection_helpers.rb
@@ -18,7 +18,7 @@ module ActionView
end
def label(label_html_options={}, &block)
- html_options = label_html_options.merge(@input_html_options)
+ html_options = @input_html_options.slice(:index, :namespace).merge(label_html_options)
@template_object.label(@object_name, @sanitized_attribute_name, @text, html_options, &block)
end
end