Module: Mack::ViewHelpers::ObjectHelpers
- Defined in:
- lib/mack/view_helpers/object_helpers.rb
Instance Method Summary collapse
-
#debug(obj) ⇒ Object
Useful for debugging objects in views.
Instance Method Details
#debug(obj) ⇒ Object
Useful for debugging objects in views. Just pass it an object and will grap the pretty print of the inspect and wrap it in HTML pre tags.
8 9 10 |
# File 'lib/mack/view_helpers/object_helpers.rb', line 8 def debug(obj) "<pre>#{pp_to_s(obj).gsub('<', '<')}</pre>" end |