Created
August 16, 2010 20:14
-
-
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)
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
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