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:
parent
a4fa0364d4
commit
613757a83d
|
@ -60,7 +60,7 @@ module Redmine
|
||||||
extension = m[2].downcase
|
extension = m[2].downcase
|
||||||
@known_types ||= Hash.new do |h, ext|
|
@known_types ||= Hash.new do |h, ext|
|
||||||
type = EXTENSIONS[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
|
h[ext] = type
|
||||||
end
|
end
|
||||||
@known_types[extension]
|
@known_types[extension]
|
||||||
|
|
Loading…
Reference in New Issue