Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jivko-chobanov
Copy link

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.

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.
<pre> not needed when html: false is set by the user.
@cowlibob
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants