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
This commit is contained in:
Jean-Philippe Lang 2014-04-26 07:44:06 +00:00
parent a4fa0364d4
commit 613757a83d
1 changed files with 1 additions and 1 deletions

View File

@ -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]