summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-04-26 07:44:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-04-26 07:44:06 +0000
commit613757a83de4f1072cd40a72edfb57ec1caf4882 (patch)
tree107fe7675deb3384bcb420cde4c94c1017591f40
parenta4fa0364d45926e2127dda7c42c6b141bb8c1402 (diff)
downloadredmine-613757a83de4f1072cd40a72edfb57ec1caf4882.tar.gz
redmine-613757a83de4f1072cd40a72edfb57ec1caf4882.zip
Support for the 1.x versions of mime-types gem (#16710).
Patch by Szilveszter Ördög. git-svn-id: http://svn.redmine.org/redmine/trunk@13107 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/mime_type.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/mime_type.rb b/lib/redmine/mime_type.rb
index 202c01e41..2bd396871 100644
--- a/lib/redmine/mime_type.rb
+++ b/lib/redmine/mime_type.rb
@@ -60,7 +60,7 @@ module Redmine
extension = m[2].downcase
@known_types ||= Hash.new do |h, ext|
type = EXTENSIONS[ext]
- type ||= MIME::Types.find {|type| type.extensions.include?(ext)}.to_s.presence
+ type ||= MIME::Types.type_for(ext).first.to_s.presence
h[ext] = type
end
@known_types[extension]