diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-05-05 14:12:08 +0200 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-05-05 14:12:08 +0200 |
commit | 5636010392b12273324846cf1d8baa46d0d857da (patch) | |
tree | 62295c694c832de906816348037326d855268d3c /actionpack/lib/action_view | |
parent | acb39848ae4cfe1d22cd8a83c5db636d80c22b47 (diff) | |
download | rails-5636010392b12273324846cf1d8baa46d0d857da.tar.gz rails-5636010392b12273324846cf1d8baa46d0d857da.tar.bz2 rails-5636010392b12273324846cf1d8baa46d0d857da.zip |
Switch token_tag if block
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 1145f348c2..802bf9d29f 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -670,11 +670,11 @@ module ActionView 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 |