lib/jets/controller/rendering/rack_renderer.rb in jets-2.1.4 vs lib/jets/controller/rendering/rack_renderer.rb in jets-2.1.5

- old
+ new

@@ -31,10 +31,11 @@ else # Rails rendering does heavy lifting # _prefixes provided by jets/overrides/rails/action_controller.rb ActionController::Base._prefixes = @controller.controller_paths renderer = ActionController::Base.renderer.new(renderer_options) + clear_view_cache body = renderer.render(render_options) body = StringIO.new(body) end [status, headers, body] # triplet @@ -148,10 +149,14 @@ # So ActionView has access back to the jets controller instance_vars[:_jets] = { controller: @controller } instance_vars end + def clear_view_cache + ActionView::LookupContext::DetailsKey.clear if Jets.env.development? + end + private # From jets/controller/response.rb def drop_content_info?(status) status.to_i / 100 == 1 or drop_body?(status) end @@ -211,10 +216,9 @@ include helper_class end end ActionController::Base.append_view_path("#{Jets.root}/app/views") - ActionView::Resolver.caching = !Jets.env.development? setup_webpacker if Jets.webpacker? end # Does not include ApplicationHelper, will include ApplicationHelper explicitly first.