Created
March 20, 2024 21:28
-
-
Save DeMarko/06bb6734ff373bdd379bc50336061bee to your computer and use it in GitHub Desktop.
I don't think this is what you're supposed to do, it feels criminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-# this does NOT work | |
- content_for :javascripts do | |
:javascript | |
alert(1); | |
- if should_render_console_log | |
console.log('butt'); | |
-# this works and I hate it | |
- console_log_stmt = should_render_console_log ? "console.log('butt');" : "" | |
- content_for :javascripts do | |
:javascript | |
alert(1); | |
#{console_log_stmt} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment