From a65037d30d70da0f84f9e97f9749ac3e579d6ad9 Mon Sep 17 00:00:00 2001 From: Ramon Maciel Date: Thu, 16 Dec 2021 14:28:19 +0100 Subject: [PATCH] Write to env the controller/action values for other middleware to use --- app/controllers/forest_liana/router.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/forest_liana/router.rb b/app/controllers/forest_liana/router.rb index 044baa67..c8e8dbf1 100644 --- a/app/controllers/forest_liana/router.rb +++ b/app/controllers/forest_liana/router.rb @@ -37,6 +37,8 @@ def call(env) end end + params["action"] = action + params["controller"] = "#{env["SCRIPT_NAME"]}/#{collection_name}".delete_prefix("/") controller.action(action.to_sym).call(env) rescue NoMethodError => exception FOREST_REPORTER.report exception