Skip to content

Instantly share code, notes, and snippets.

@ferromir
Created March 20, 2015 05:27
Show Gist options
  • Save ferromir/982e01e1e8f022817241 to your computer and use it in GitHub Desktop.
Save ferromir/982e01e1e8f022817241 to your computer and use it in GitHub Desktop.
ACR - Ruby - Log sensitive data
# Given an user
@user = Article.new(params[:user])
# Bad
logger.debug "New user: #{@user.attributes.inspect}"
# Good
logger.debug "New user: #{@user.attributes.id}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment