提交 e4314d43 编写于 作者: M Michael S. Klishin

Inline the only call site of Mime::Type#browser_generated?

Signed-off-by: NMichael S. Klishin <michael@novemberain.com>
上级 69e349f1
......@@ -191,17 +191,13 @@ def =~(mime_type)
# Returns true if Action Pack should check requests using this Mime Type for possible request forgery. See
# ActionController::RequestForgeryProtection.
def verify_request?
browser_generated?
@@browser_generated_types.include?(to_sym)
end
def html?
@@html_types.include?(to_sym) || @string =~ /html/
end
def browser_generated?
@@browser_generated_types.include?(to_sym)
end
private
def method_missing(method, *args)
if method.to_s =~ /(\w+)\?$/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册