awesome-print / awesome_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
http://github.com/michaeldv/awesome_print
MIT License
4.07k stars 454 forks source link

Allow for optional, non-html output in action_view #364

Open jivko-chobanov opened 5 years ago

jivko-chobanov commented 5 years ago

When html: false is explicitly set, that should not be overridden by the ext/action_view, i.e. defaults must not be forced.

Usage scenario: Rails+cucumber+byebug+awesome_print. I type in my view (index.slim) "- byebug". Then I run cucumber test. Then the test stops at that byebug line, providing me with a byebug console in that context from terminal. Then I type "ap product" and I get the default behaviour - a lot of html output in console - not needed. Then I type "ap product, html: false" and to my surprise I get the same output. That's because my html: false was overridden by awesome print ext/action_view.

cowlibob commented 2 years ago

I would love to see this merged. Not all ap usage inside a view is to dump to HTML (I have never used that).