From 05431a2dd15dbc0c800cf14aefde9078aaaf51c5 Mon Sep 17 00:00:00 2001 From: Anna Velentsevich Date: Mon, 19 Aug 2024 15:42:08 +0200 Subject: [PATCH 1/2] allow code for plans_controller#show to contain dots --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 77d602e64b5..abef891977c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -62,7 +62,7 @@ put :finalize, on: :member end resources :payment_requests, only: %i[create index] - resources :plans, param: :code + resources :plans, param: :code, code: /.*/ resources :taxes, param: :code resources :wallet_transactions, only: :create get '/wallets/:id/wallet_transactions', to: 'wallet_transactions#index' From a6e0dfd66550a4b93813d9f632cb9193a3630036 Mon Sep 17 00:00:00 2001 From: Anna Velentsevich Date: Fri, 30 Aug 2024 07:51:56 +0200 Subject: [PATCH 2/2] allow dots at all routes where we are using plans --- config/routes.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index abef891977c..4984b9add8b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -37,10 +37,10 @@ resources :subscriptions, only: %i[create update show index], param: :external_id delete '/subscriptions/:external_id', to: 'subscriptions#terminate', as: :terminate - resources :add_ons, param: :code - resources :billable_metrics, param: :code + resources :add_ons, param: :code, code: /.*/ + resources :billable_metrics, param: :code, code: /.*/ - resources :coupons, param: :code + resources :coupons, param: :code, code: /.*/ resources :credit_notes, only: %i[create update show index] do post :download, on: :member put :void, on: :member @@ -63,7 +63,7 @@ end resources :payment_requests, only: %i[create index] resources :plans, param: :code, code: /.*/ - resources :taxes, param: :code + resources :taxes, param: :code, code: /.*/ resources :wallet_transactions, only: :create get '/wallets/:id/wallet_transactions', to: 'wallet_transactions#index' resources :wallets, only: %i[create update show index]