From 613757a83de4f1072cd40a72edfb57ec1caf4882 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 26 Apr 2014 07:44:06 +0000 Subject: [PATCH] Support for the 1.x versions of mime-types gem (#16710). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Szilveszter Ördög. git-svn-id: http://svn.redmine.org/redmine/trunk@13107 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]