Permalink
Browse files

Patch FormTagHelper so that when a form tag is created, the div which…

… holds the form authenticity token is set to display:inline [#2846 state:resolved]

Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
  • Loading branch information...
1 parent 4d8fd8d commit 0d3c5f0a822cd1b6029b5f619774b7794a94f370 @mcmire mcmire committed with Yehuda Katz + Carl Lerche Jun 28, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -450,10 +450,10 @@ def extra_tags_for_form(html_options)
''
when /^post$/i, "", nil
html_options["method"] = "post"
- protect_against_forgery? ? content_tag(:div, token_tag, :style => 'margin:0;padding:0') : ''
+ protect_against_forgery? ? content_tag(:div, token_tag, :style => 'margin:0;padding:0;display:inline') : ''
else
html_options["method"] = "post"
- content_tag(:div, tag(:input, :type => "hidden", :name => "_method", :value => method) + token_tag, :style => 'margin:0;padding:0')
+ content_tag(:div, tag(:input, :type => "hidden", :name => "_method", :value => method) + token_tag, :style => 'margin:0;padding:0;display:inline')
end
end

1 comment on commit 0d3c5f0

Contributor

sobrinho commented on 0d3c5f0 Jul 21, 2009

Use 'style="display: none"' is not better? This will complete hide the div tag...

Please sign in to comment.