Skip to content

Commit 9ced000

Browse files
committed
Write in inverted way instead of calling invert.
1 parent 0063e62 commit 9ced000

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/grape/middleware/base.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def content_type
5656

5757
def mime_types
5858
content_types.each_with_object({}) do |(k, v), types_without_params|
59-
types_without_params[k] = v.split(';').first
60-
end.invert
59+
types_without_params[v.split(';').first] = k
60+
end
6161
end
6262
end
6363
end

0 commit comments

Comments
 (0)