diff --git a/Gemfile b/Gemfile index f416f12a9..c4d942c0c 100644 --- a/Gemfile +++ b/Gemfile @@ -42,6 +42,9 @@ gem "devise", "~> 4.3" gem "govuk_elements_rails", "~> 3.1" gem "govuk_template", "~> 0.23" +# Use High Voltage for static pages +gem "high_voltage" + group :development, :test do # Call "byebug" anywhere in the code to stop execution and get a debugger console gem "byebug" diff --git a/Gemfile.lock b/Gemfile.lock index 24c4eaadf..b6768951a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,6 +82,7 @@ GEM sass (>= 3.2.0) govuk_template (0.23.0) rails (>= 3.1) + high_voltage (3.0.0) i18n (0.9.0) concurrent-ruby (~> 1.0) jbuilder (2.7.0) @@ -224,6 +225,7 @@ DEPENDENCIES factory_bot_rails govuk_elements_rails (~> 3.1) govuk_template (~> 0.23) + high_voltage jbuilder (~> 2.0) jquery-rails mongoid (~> 5.2) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb deleted file mode 100644 index e2392ce9a..000000000 --- a/app/controllers/pages_controller.rb +++ /dev/null @@ -1,15 +0,0 @@ -class PagesController < ApplicationController - def show - if valid_page? - render template: "pages/#{params[:page]}" - else - render file: "public/404.html", status: :not_found - end - end - - private - - def valid_page? - File.exist?(Pathname.new(Rails.root + "app/views/pages/#{params[:page]}.html.erb")) - end -end diff --git a/app/views/shared/_footer.html.erb b/app/views/shared/_footer.html.erb index 96df667a1..a7ce69698 100644 --- a/app/views/shared/_footer.html.erb +++ b/app/views/shared/_footer.html.erb @@ -3,7 +3,7 @@ <%= t(".support_text") %>

diff --git a/config/routes.rb b/config/routes.rb index 10c16a9e6..f6b230976 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,7 +6,5 @@ resources :registrations - get "/pages/:page" => "pages#show" - root "registrations#index" end