Normalize page paths

Normalize page paths so they can be accessed by `page_path(:id)`.

The benefit of this is that we can add any arbitrary amount of pages
without affecting the routing layer.
This commit is contained in:
Josep Jaume Rey Peroy
2015-12-12 10:22:27 +01:00
parent 085a52ea00
commit 80104d100f
6 changed files with 31 additions and 95 deletions

View File

@@ -259,21 +259,7 @@ Rails.application.routes.draw do
end
# static pages
get "/census_terms", to: "pages#census_terms"
get "/conditions", to: "pages#conditions"
get "/general_terms", to: "pages#general_terms"
get "/privacy", to: "pages#privacy"
get "/coming_soon", to: "pages#coming_soon"
get "/how_it_works", to: "pages#how_it_works"
get "/how_to_use", to: "pages#how_to_use"
get "/more_information", to: "pages#more_information"
get "/opendata", to: "pages#opendata"
get "/participation", to: "pages#participation"
get "/proposals_info", to: "pages#proposals_info"
get "/participation_facts", to: "pages#participation_facts"
get "/participation_world", to: "pages#participation_world"
get "/faq", to: "pages#faq"
get "/blog", to: "pages#blog"
get "/accessibility", to: "pages#accessibility"
get "/verifica", to: "verification/letter#edit"
get '/blog' => redirect("http://diario.madrid.es/participa/")
resources :pages, path: '/', only: [:show]
end