Skip to content

Added fix for rails 5 issue involving parse_formatted_parameters error…#4

Open
MichaelPoP wants to merge 1 commit intokares:masterfrom
MichaelPoP:rails_5_fix
Open

Added fix for rails 5 issue involving parse_formatted_parameters error…#4
MichaelPoP wants to merge 1 commit intokares:masterfrom
MichaelPoP:rails_5_fix

Conversation

@MichaelPoP
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant