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

contentFor behavior changed #39

Closed
stanislas-m opened this issue Jan 20, 2018 · 1 comment
Closed

contentFor behavior changed #39

stanislas-m opened this issue Jan 20, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@stanislas-m
Copy link
Member

contentFor helper behavior changed between versions v3.6.3 (the one gobuffalo.io uses now) and the latest version v3.6.8.

Before the upgrade, I used the helper like that:

<% contentFor("javascripts") { %>
    <%= javascriptTag("forums.js") %>
<% } %>

Now, I need to use the output version (with the =):

<%= contentFor("javascripts") { %>
    <%= javascriptTag("forums.js") %>
<% } %>

Since <%= is for output matters, contentsFor should use the <% version: it's only a setter.

@stanislas-m stanislas-m added the bug Something isn't working label Jan 20, 2018
@stanislas-m
Copy link
Member Author

stanislas-m commented Jan 20, 2018

It works when I use <% contentFor("javascripts") { %> and <%= contentOf("javascripts") { %> in the same template file (application.html), but not when the contentFor is in a partial or in the contents (the yielded part).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant