Skip to content

Instantly share code, notes, and snippets.

@karthiks
Created September 6, 2011 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karthiks/1197003 to your computer and use it in GitHub Desktop.
Save karthiks/1197003 to your computer and use it in GitHub Desktop.
Rails 3 - Filtering Sensitive Parameters From Being Logged
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
module MyRails3App
class Application < Rails::Application
# All application configurations goes here...
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password, :creditcardnumber, :cvv]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment