Created
May 28, 2013 21:15
-
-
Save tomchapin/5666208 to your computer and use it in GitHub Desktop.
Session Debugger (put in application_controller.rb). Courtesy of Jason Waldrip.
This file contains hidden or 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 session_with_debug | |
| SessionDebugger.new(session_without_debug) | |
| end | |
| alias_method_chain :session, :debug | |
| class SessionDebugger < SimpleDelegator | |
| def []=(key, val) | |
| puts "#{caller.first} SET session:#{key} TO #{val.inspect}" | |
| super | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment