[Feature Proposal] add default_parameter_encoding to ActionController::ParameterEncoding::ClassMethods

Hi all.

I suggest to add default_parameter_encoding to ActionController::ParameterEncoding::ClassMethods.

Usecase

I had implemented inter-system callback endpoint into my project recently. The other system speaks non UTF-8 charactor encoding(eg. SHIFT_JIS).

In this case, I use param_encoding for specify parameter encoding now. The number of parameters in the request from the other system is very many, amounting to dozens.

Therefore, there are dozens of lines of param_encoding, which is very long. By adding default_parameter_encoding, this can be reduced to one line.

The implementation is already in my repository.

I can create a PullRequest if you like. What do you think about this?

2 Likes