Skip to content

Commit beca1f2

Browse files
committedFeb 2, 2009
Template#mime_type should not use Mime::Type when Action Controller is not included
1 parent ed5fa2f commit beca1f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎actionpack/lib/action_view/template.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def content_type
133133
end
134134

135135
def mime_type
136-
Mime::Type.lookup_by_extension(format) if format
136+
Mime::Type.lookup_by_extension(format) if format && defined?(::Mime)
137137
end
138138
memoize :mime_type
139139

0 commit comments

Comments
 (0)