Skip to content

Instantly share code, notes, and snippets.

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 hsribei/527646 to your computer and use it in GitHub Desktop.
Save hsribei/527646 to your computer and use it in GitHub Desktop.
How to debug Hash attribution for a specific key (like when you want to debug Rails' env hash)
class Hash
def assign_with_debugger(key, value)
debugger if key == "action_dispatch.request.path_parameters"
self.assign_without_debugger(key, value)
end
alias :assign_without_debugger :[]=
alias :[]= :assign_with_debugger
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment