提交 56360103 编写于 作者: O Oscar Del Ben

Switch token_tag if block

上级 acb39848
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册