Skip to content
  • Petrik's avatar
    080edb44
    Shorten inspect on AbstractController::Base · 080edb44
    Petrik authored
    Calling self in an action of a controller generates an endless stream of
    characters, including the request object and all instances variables.
    This can be frustrating when using a debugger in a controller and
    accidentally calling `self` generates output for a couple of seconds.
    
    This shortens inspect to only show the class name.
    
        MyController.new.inspect # => "#<MyController:0x00000000005028>"
    080edb44
    Shorten inspect on AbstractController::Base
    Petrik authored
    Calling self in an action of a controller generates an endless stream of
    characters, including the request object and all instances variables.
    This can be frustrating when using a debugger in a controller and
    accidentally calling `self` generates output for a couple of seconds.
    
    This shortens inspect to only show the class name.
    
        MyController.new.inspect # => "#<MyController:0x00000000005028>"
Loading