lib/scrivito/controller_runtime.rb in scrivito_sdk-0.66.0 vs lib/scrivito/controller_runtime.rb in scrivito_sdk-0.70.0.rc1
- old
+ new
@@ -7,9 +7,17 @@
protected
attr_internal :scrivito_runtime
+ def process_action(action, *args)
+ # We also need to reset the runtime before each action
+ # because of queries in middleware or in cases we are streaming
+ # and it won't be cleaned up by the method below.
+ reset_scrivito_runtime
+ super
+ end
+
def cleanup_view_runtime
self.scrivito_runtime = reset_scrivito_runtime
runtime = super