Gestion des anciennes url pour éditer un evt

This commit is contained in:
echarp 2014-09-15 11:40:11 +02:00
parent 4f020996a7
commit 0b4faa6a74

View File

@ -25,6 +25,9 @@ Rails.application.routes.draw do
# Manage former php pages
get 'showevent.php', to: redirect { |_, req| "events/#{req.params[:id]}" }
get 'listevents.php', to: redirect { |_, req| "events?#{req.query_string}" }
get 'editevent.php', to: redirect(lambda do |_, req|
"events/#{req.params[:id]}/edit?secret=#{req.params[:secret]}"
end)
# A mechanism to list "all" events
get '(:format)listevents.php',
to: redirect { |_, r| "events.#{r.format.to_sym}?#{r.query_string}" }