nikolalsvk / render_async

render_async lets you include pages asynchronously with AJAX
https://rubygems.org/gems/render_async/
MIT License
1.08k stars 75 forks source link

content_for :render_async does nothing. #149

Closed Overload119 closed 3 years ago

Overload119 commented 3 years ago

Render async is not working as a result. Any tips for debugging?

= content_for :render_async
= render_async my_path do
    ...
<div id="render_async_44dbb2c2501634604700">...</div>

I'm using Turbolinks and Webpacker (if that's relevant).

Note that I was using layout: false and no layout. I tried adding to application layout but the same result.

Another thing I tried is adding a breakpoint to my view to check the value of content_for :render_async and the result is nil.

Overload119 commented 3 years ago

Okay, I fixed this.

= content_for :render_async has to be placed AFTER render_async