Skip to content

Commit 57804f6

Browse files
ramongtxRamon Maciel
andauthored
feat(router): make controller and action available to middleware (#533)
Co-authored-by: Ramon Maciel <ramon.maciel@qonto.com>
1 parent 8ebba66 commit 57804f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/controllers/forest_liana/router.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def call(env)
3737
end
3838
end
3939

40+
params["action"] = action
41+
params["controller"] = "#{env["SCRIPT_NAME"]}/#{collection_name}".delete_prefix("/")
4042
controller.action(action.to_sym).call(env)
4143
rescue NoMethodError => exception
4244
FOREST_REPORTER.report exception

0 commit comments

Comments
 (0)