Skip to content

Commit a135bfa

Browse files
authored
fix: register_parameter_parser overiding custom config (#109)
#106
1 parent 26bc4dc commit a135bfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/graphiti/rails/railtie.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def register_mime_type
7272

7373
def register_parameter_parser
7474
if ::Rails::VERSION::MAJOR >= 5
75-
ActionDispatch::Request.parameter_parsers[:jsonapi] = PARSER
75+
ActionDispatch::Request.parameter_parsers[:jsonapi] ||= PARSER
7676
else
77-
ActionDispatch::ParamsParser::DEFAULT_PARSERS[Mime[:jsonapi]] = PARSER
77+
ActionDispatch::ParamsParser::DEFAULT_PARSERS[Mime[:jsonapi]] ||= PARSER
7878
end
7979
end
8080

0 commit comments

Comments
 (0)