Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch token_tag if block

  • Loading branch information...
commit 5636010392b12273324846cf1d8baa46d0d857da 1 parent acb3984
@oscardelben oscardelben authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_view/helpers/url_helper.rb
View
6 actionpack/lib/action_view/helpers/url_helper.rb
@@ -670,11 +670,11 @@ def convert_boolean_attributes!(html_options, bool_attrs)
end
def token_tag(token=nil)
- if token == false || !protect_against_forgery?
- ''
- else
+ if token != false && protect_against_forgery?
token ||= form_authenticity_token
tag(:input, :type => "hidden", :name => request_forgery_protection_token.to_s, :value => token)
+ else
+ ''
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.