Permalink
Browse files

fixed mimetype_fu integration

  • Loading branch information...
benalavi committed May 5, 2009
1 parent af44429 commit 902364852bc9e8a0cdc18113b56e7f7475325557
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/milton/core/file.rb
View
@@ -15,12 +15,10 @@ def extension(filename)
# File respond_to?(:mime_type) is true if mimetype_fu is installed, so
# this way we always have File.mime_type? available but it favors
# mimetype_fu's implementation.
- unless respond_to?(:mime_type?)
- def mime_type?(file)
- file.content_type
- end
+ def mime_type?(file)
+ ::File.respond_to?(:mime_type?) ? super(file.filename) : file.content_type
end
end
end
end
-end
+end

0 comments on commit 9023648

Please sign in to comment.