Commit 19268104 by minad

code cleanup

parent 693b9fe5
......@@ -74,7 +74,7 @@ class MimeMagic
# Lookup mime type by file extension
def self.by_extension(ext)
ext = ext.to_s.downcase
mime = EXTENSIONS[ext] || (ext[0..0] == '.' && EXTENSIONS[ext[1..-1]])
mime = ext[0..0] == '.' ? EXTENSIONS[ext[1..-1]] : EXTENSIONS[ext]
mime ? new(mime) : nil
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment