Skip to content

🐛 Fix bug: register_parameter_parser overiding custom config #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 21, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
🐛 Fix bug: register_parameter_parser overiding custom config
  • Loading branch information
svobom57 committed Jan 30, 2024
commit aa662bd1801129e7697a315347160f27904f164f
4 changes: 2 additions & 2 deletions lib/graphiti/rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def register_mime_type

def register_parameter_parser
if ::Rails::VERSION::MAJOR >= 5
ActionDispatch::Request.parameter_parsers[:jsonapi] = PARSER
ActionDispatch::Request.parameter_parsers[:jsonapi] ||= PARSER
else
ActionDispatch::ParamsParser::DEFAULT_PARSERS[Mime[:jsonapi]] = PARSER
ActionDispatch::ParamsParser::DEFAULT_PARSERS[Mime[:jsonapi]] ||= PARSER
end
end

Expand Down