diff options
author | Vasiliy Ermolovich <younash@gmail.com> | 2013-09-22 16:37:12 +0300 |
---|---|---|
committer | Vasiliy Ermolovich <younash@gmail.com> | 2013-09-22 21:49:01 +0300 |
commit | 0b0ac5d917ccfe3e48bc75456dbccf48de7f33d0 (patch) | |
tree | 7fe3d2679b7febaa67517a55aead14b964cff0ae /actionview/lib | |
parent | 80008352675add5a6b4aaded715fc02329a02004 (diff) | |
download | rails-0b0ac5d917ccfe3e48bc75456dbccf48de7f33d0.tar.gz rails-0b0ac5d917ccfe3e48bc75456dbccf48de7f33d0.tar.bz2 rails-0b0ac5d917ccfe3e48bc75456dbccf48de7f33d0.zip |
handle `:namespace` form option in collection labels
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/tags/collection_helpers.rb | 3 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/label.rb | 1 |
2 files changed, 3 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 388dcf1f13..787039c82e 100644 --- a/actionview/lib/action_view/helpers/tags/collection_helpers.rb +++ b/actionview/lib/action_view/helpers/tags/collection_helpers.rb @@ -18,7 +18,8 @@ module ActionView end def label(label_html_options={}, &block) - @template_object.label(@object_name, @sanitized_attribute_name, @text, label_html_options, &block) + html_options = label_html_options.merge(@input_html_options) + @template_object.label(@object_name, @sanitized_attribute_name, @text, html_options, &block) end end diff --git a/actionview/lib/action_view/helpers/tags/label.rb b/actionview/lib/action_view/helpers/tags/label.rb index 35d3ba8434..180aa9ac27 100644 --- a/actionview/lib/action_view/helpers/tags/label.rb +++ b/actionview/lib/action_view/helpers/tags/label.rb @@ -30,6 +30,7 @@ module ActionView add_default_name_and_id_for_value(tag_value, name_and_id) options.delete("index") options.delete("namespace") + options.delete("multiple") options["for"] = name_and_id["id"] unless options.key?("for") if block_given? |