diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index ace457df2e992..8c29c590eb87c 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -745,6 +745,13 @@ def extra_tags_for_form(html_options) end tags = utf8_enforcer_tag << method_tag + + if hidden_data = html_options.delete("hidden_data") + hidden_data.map{|name, value| + tags << text_field_tag(name, value, {"type" => "hidden"}) + } + end + content_tag(:div, tags, :style => 'margin:0;padding:0;display:inline') end