nice_partials icon indicating copy to clipboard operation
nice_partials copied to clipboard

Support rendering partials from controller renderers

Open seanpdoyle opened this issue 2 years ago • 1 comments

Gems like turbo-rails utilize the ActionController::Renderer.renderer class method to render templates and partials outside the context of a request-response cycle.

Prior to this bugfix, partials rendered by controller renderers raised errors like the following:

Error:
RendererTest#test_TestController.render_partial_that_declares_helper_methods:
ActionView::Template::Error: undefined method `helpers' for nil:NilClass
    bullet-train-co/nice_partials/test/fixtures/_partial_with_helpers.html.erb:2:in `_fixtures__partial_with_helpers_html_erb__3099800394007487670_4260'

seanpdoyle avatar Nov 15 '23 20:11 seanpdoyle

@seanpdoyle I forgot to say thank you for this! I haven't worked on Nice Partials in a bit, and I don't know when I'll get to this yet. But yeah, it would be cool to fix this 😄

kaspth avatar Nov 27 '23 21:11 kaspth