From c268722caff97c042871683c0d5706a909a6d6e4 Mon Sep 17 00:00:00 2001 From: irisfaraway Date: Tue, 18 Sep 2018 10:46:53 +0100 Subject: [PATCH] Don't include registrations test page in production We have a page at /fo/registrations or /bo/registrations which is used for testing. However we don't want this to be available in production, so this disables the route when the engine is used in a production environment. --- config/routes.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 13976ebf7..d8c1ac931 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,7 @@ WasteCarriersEngine::Engine.routes.draw do - resources :registrations, only: [:index] + unless Rails.env.production? + resources :registrations, only: [:index] + end resources :renewal_start_forms, only: [:new, :create],