-
-
Save fellix/a186598a873cdad1e900 to your computer and use it in GitHub Desktop.
monkey patch to allow filter parameters in a rails 2 app running ruby 2.1
This file contains 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
module ActionController | |
class Base | |
def log_processing_for_parameters | |
parameters = respond_to?(:filter_parameters, true) ? filter_parameters(params) : params.dup | |
parameters = parameters.except!(:controller, :action, :format, :_method) | |
logger.info " Parameters: #{parameters.inspect}" unless parameters.empty? | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment