Browse files

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

…s not included
  • Loading branch information...
1 parent ed5fa2f commit beca1f2e151558ded3d5a4efebd328ab2533edc6 @lifo lifo committed Feb 2, 2009
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

0 comments on commit beca1f2

Please sign in to comment.