Created
August 28, 2013 21:04
-
-
Save jmazzi/6371253 to your computer and use it in GitHub Desktop.
Filter arbitrary hashes in rails using your configured filter parameters.
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
def scrub(hash) | |
filter_with = Rails.application.config.filter_parameters | |
ActionDispatch::Http::ParameterFilter.new(filter_with).filter(hash) | |
end |
Author
jmazzi
commented
Aug 28, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment