Skip to content

Commit

Permalink
Patch FormTagHelper so that when a form tag is created, the div which…
Browse files Browse the repository at this point in the history
… 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
mcmire authored and Yehuda Katz + Carl Lerche committed Jul 2, 2009
1 parent ee7d4c4 commit 8bb510f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/action_view/helpers/form_tag_helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -451,10 +451,10 @@ def extra_tags_for_form(html_options)
'' ''
when /^post$/i, "", nil when /^post$/i, "", nil
html_options["method"] = "post" 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 else
html_options["method"] = "post" 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
end end


Expand Down

0 comments on commit 8bb510f

Please sign in to comment.