Skip to content

Conversation

@rlue
Copy link

@rlue rlue commented Jan 7, 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.

But per lines 140 and 169 of Sprockets::Rails::Helper:

if options["debug"] != false && request_debug_assets?

This conditional allows debugging to be explicitly disabled on a tag when Rails.application.config.assets.debug == true, but not vice versa.

This PR uses the naive solution (simply adding || options["debug"]) rather than performing more extensive refactoring, since comments indicate that this method is slated for deprecation anyway.

@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @rafaelfranca (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

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.

3 participants