From a532ba114e130ecdf428454637772b01a929f125 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 24 May 2014 16:39:54 +0000 Subject: [PATCH] Merged r13107 (#16710). git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@13165 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/mime_type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] -- 2.39.5