DebugHelper
The DebugHelper
class isnât exactly a powerful debugger, but its one
method lets you do something thatâs often useful in development
modeâreport an objectâs contents:
debug
The
debug
method takes an object as its argument. It then serializes the object into YAML, and wraps the YAML output (and any errors) inpre
tags so you can inspect it.
Get Learning Rails now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.