Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Template#mime_type should not use Mime::Type when Action Controller i…

…s not included
  • Loading branch information...
commit beca1f2e151558ded3d5a4efebd328ab2533edc6 1 parent ed5fa2f
@lifo lifo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/template.rb
View
2  actionpack/lib/action_view/template.rb
@@ -133,7 +133,7 @@ def content_type
end
def mime_type
- Mime::Type.lookup_by_extension(format) if format
+ Mime::Type.lookup_by_extension(format) if format && defined?(::Mime)
end
memoize :mime_type
Please sign in to comment.
Something went wrong with that request. Please try again.