/ Published in: Rails
                    
                                        The 'request' and 'response' objects are chock full of useful info.  But console can't usually access them.  Here's how:
start the server with the -u option, insert a breakpoint where you would like to have access to the controllers/helpers/etc. When finished, just type 'cont' to continue execution
                start the server with the -u option, insert a breakpoint where you would like to have access to the controllers/helpers/etc. When finished, just type 'cont' to continue execution
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 # terminal script/server -u # /some/view.erb <% debugger %> # open the url associated with that view, and switch over to the terminal to play with ActionController methods and objects (rdb:2) request
Comments
                    Subscribe to comments
                
                