I figured out how to use content_for for some elements, for example <title>:
<% content_for :title, "Hi, I'm #{@user.username}" %>
But I can't seem to get it working when I need to inject a <script> tag with src attribute. I.e. this code:
<script src="https://js.stripe.com/v3/"></script>
How can I use content_for to place a script tag (with src attribute) in the head of a page?