Skip to content

Instantly share code, notes, and snippets.

@DeMarko
Created March 20, 2024 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeMarko/06bb6734ff373bdd379bc50336061bee to your computer and use it in GitHub Desktop.
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 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