Meilleur routage, les anciennes pages en php sont redirigées vers les nouvelles

This commit is contained in:
echarp 2014-07-19 09:31:02 +02:00
parent 413bef5726
commit 56a7654e05
1 changed files with 5 additions and 3 deletions

View File

@ -23,10 +23,12 @@ Rails.application.routes.draw do
resources :tags, only: [ :index, :show ]
resources :maps, only: [:index]
# A mechanism to list "all" events
get '(:format)listevents.php', to: 'events#index'
# Manage former php pages
get 'showevent.php', to: redirect { |params, request| "events/#{request.params[:id]}" }
# Respond to rss and ical calls
get ':format.php' => 'events#index'
get '(:format).php', to: redirect { |params, request| "events.#{request.format.to_sym}?#{request.query_string}" }
# A mechanism to list "all" events
get '(:format)listevents.php', to: redirect { |params, request| "events.#{request.format.to_sym}?#{request.query_string}" }
devise_for :users, path: '', path_names: {sign_in: 'login', sign_out: 'logout'}
devise_for :admin_users, ActiveAdmin::Devise.config