Added fix for rails 5 issue involving parse_formatted_parameters error…#4
Open
MichaelPoP wants to merge 1 commit intokares:masterfrom
Open
Added fix for rails 5 issue involving parse_formatted_parameters error…#4MichaelPoP wants to merge 1 commit intokares:masterfrom
MichaelPoP wants to merge 1 commit intokares:masterfrom
Conversation
…fined method error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Due to changes in the requried actionpack gem from rails 4.x to rails 5.x the location of the parse_formatted_parameters method has changed. The two actionpack versions I was testing on are…actionpack-4.2.11 and actionpack-5.0.7.2
Here is the difference in the location of the parse_formatted_parameters method:
4.2.11
Location: lib/action_dispatch/middleware/params_parser.rb
Class/Module: (class) ActionDispatch::ParamsParser::ParseError
5.0.7.2
Location: lib/action_dispatch/http/parameters.rb
Class/Module: (module) ActionDispatch::Http::Parameters
This change will now take into account the new location of the method in rails 5.x by checking if the module ActionDispatch::Http::Parameters exists
I have made this change locally while updating my app to rails 5 and it seems to have fixed the issue. Im am not 100% sure that the content of the method is correct, I only copy/pasted from the rails 4.x version