Module: AmazingPrint::ActionView
- Defined in:
- lib/amazing_print/ext/action_view.rb
Instance Method Summary collapse
-
#ap_debug(object, options = {}) ⇒ Object
(also: #ap)
Use HTML colors and add default “debug_dump” class to the resulting HTML.
Instance Method Details
#ap_debug(object, options = {}) ⇒ Object Also known as: ap
Use HTML colors and add default “debug_dump” class to the resulting HTML.
11 12 13 14 15 16 17 18 |
# File 'lib/amazing_print/ext/action_view.rb', line 11 def ap_debug(object, = {}) object.ai( .merge(html: true) ).sub( /^<pre([\s>])/, '<pre class="debug_dump"\\1' ).html_safe end |