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
content_for and yield #176
Comments
I think this is not possible if streaming is activated since the content of the layout is generated before the partials. Can you ask on a rails list please? Please try if the issue is really streaming by turning streaming off:
|
I think I just confirmed the problem here. It looks like you can't capture view data from partials inside layouts, only templates. |
Ok, seems that partials don't allow content_for. |
@minad Is that a rails or a slim limitation? |
I think this statement
is not true. Anyway, this is really not a SLIM issue. |
I have this in app/views/layouts/application.html.slim
and this in app/views/application/_gitkit.html.slim
Ideally, I should see
= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/googleapis/0.0.4/googleapis.min.js"
where= yield :javascript
is in my layout, but this does not happen. Thediv id='gitkit'
part shows up but the contents ofcontent_for :javascript
are nowhere to be found.I've tried using
- content_for
,= content_for
, and== content_for
, all to no avail.I'm using Rails 3.1.0 with Slim 1.0.2
The text was updated successfully, but these errors were encountered: