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

Error in Rails Guides? (Asset Pipeline: tag helpers' debug option) #31647

Closed
rlue opened this issue Jan 6, 2018 · 2 comments
Closed

Error in Rails Guides? (Asset Pipeline: tag helpers' debug option) #31647

rlue opened this issue Jan 6, 2018 · 2 comments

Comments

@rlue
Copy link
Contributor

rlue commented Jan 6, 2018

From Section 3.3 of the Edge Guides on the Asset Pipeline:

Debug mode can also be enabled in Rails helper methods:

<%= stylesheet_link_tag "application", debug: true %>
<%= javascript_include_tag "application", debug: true %>

The :debug option is redundant if debug mode is already on.

When I try this in Rails 5.1, it simply adds a debug="true" HTML attribute to the corresponding tag, rather than enabling debug mode on the specified tag helper. Furthermore, the Edge API documentation makes no mention of a debug option.

I've also looked into the source for the javascript_include_tag method as far back as it goes in the repo (4.1-stable), and I see no mention of such an option.

Am I missing something, or is this information incorrect? If so, would the team accept a PR amending this portion of the guides?

@georgeclaghorn
Copy link
Contributor

The debug option is (supposed to be) implemented in sprockets-rails. Do you not use Sprockets in your app?

@rlue
Copy link
Contributor Author

rlue commented Jan 7, 2018

Thanks! This was a bug in sprockets-rails; I've submitted a PR for it.

@rlue rlue closed this as completed Jan 7, 2018
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

No branches or pull requests

2 participants