Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor pages to fix security issue #2

Merged
merged 2 commits into from
Nov 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
15 changes: 0 additions & 15 deletions app/controllers/pages_controller.rb

This file was deleted.

4 changes: 2 additions & 2 deletions app/views/shared/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%= t(".support_text") %>
</p>
<ul>
<li class="inline"><%= link_to 'Privacy', "/pages/privacy", target: "_blank" %></li>
<li class="inline"><%= link_to 'Cookies', "/pages/cookies", target: "_blank" %></li>
<li class="inline"><%= link_to 'Privacy', page_path("privacy"), target: "_blank" %></li>
<li class="inline"><%= link_to 'Cookies', page_path("cookies"), target: "_blank" %></li>
</ul>
</div>
2 changes: 0 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@

resources :registrations

get "/pages/:page" => "pages#show"

root "registrations#index"
end