Skip to content

Commit 46dacca

Browse files
committed
Fix deprecation warning about constant usage
Rails 5 requires looking up registered mime types based on their defined symbol aliases: > DEPRECATION WARNING: Accessing mime types via constants is deprecated. > Please change `Mime::JSON` to `Mime[:json]`. (called from formats at > lib/kracken/json_api/request.rb:53)
1 parent 69c0420 commit 46dacca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/kracken/json_api/request.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ def formats
4848
accepts
4949
# original_format would be set by the ABOVE two conditions
5050
elsif xhr?
51-
[Mime::JS]
51+
Mime[:js]
5252
else
53-
[Mime::JSON]
53+
Mime[:json]
5454
end
5555
end
5656
end

0 commit comments

Comments
 (0)