Permalink
Browse files

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

Signed-off-by: Michael S. Klishin <michael@novemberain.com>
  • Loading branch information...
1 parent 69e349f commit e4314d4362d288ff72cec5a5a9644a3a3cbf23af @michaelklishin michaelklishin committed Dec 26, 2008
Showing with 1 addition and 5 deletions.
  1. +1 −5 actionpack/lib/action_controller/mime_type.rb
View
6 actionpack/lib/action_controller/mime_type.rb
@@ -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+)\?$/

0 comments on commit e4314d4

Please sign in to comment.