From 5e546275cc376160f1dbdc464a2a800640b9c041 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 26 Jun 2024 11:38:16 -0400 Subject: [PATCH] Use `with_options` for shared settings option in `admin` routes --- config/routes/admin.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 50c4c10594a..e75c57b71b0 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -40,8 +40,10 @@ namespace :admin do end end - get '/settings', to: redirect('/admin/settings/branding') - get '/settings/edit', to: redirect('/admin/settings/branding') + with_options to: redirect('/admin/settings/branding') do + get '/settings' + get '/settings/edit' + end namespace :settings do resource :branding, only: [:show, :update], controller: 'branding'