nice_partials
nice_partials copied to clipboard
Support rendering partials from controller renderers
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 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 😄