From 8f1cd5010b6e697fd4a071af77a0fb8d74162aa8 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Tue, 26 Jan 2010 00:48:16 -0600 Subject: [PATCH] Fix Routes for Previous Commit Yow! That was fuggly. These routes work better. There's still a problem with cache-sweeping, though. --- config/routes.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index c1ae35f7..43b5f774 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -25,9 +25,10 @@ ActionController::Routing::Routes.draw do |map| connect_to_web map, ':web/import/:id', :controller => 'file', :action => 'import' connect_to_web map, ':web/login', :controller => 'wiki', :action => 'login' connect_to_web map, ':web/web_list', :controller => 'wiki', :action => 'web_list' - connect_to_web map, ':web/show/diff/:id', :controller => 'wiki', :action => 'show', :mode => 'diff' - connect_to_web map, ':web/revision/diff/:id/:rev', :controller => 'wiki', :action => 'revision', :mode => 'diff', :requirements => { :rev => /\d*/} - connect_to_web map, ':web/revision/:id/:rev', :controller => 'wiki', :action => 'revision', :requirements => { :rev => /\d*/} + connect_to_web map, ':web/show/diff/:id', :controller => 'wiki', :action => 'show', :mode => 'diff', :requirements => {:id => /[^\/]*/} + connect_to_web map, ':web/revision/diff/:id/:rev', :controller => 'wiki', :action => 'revision', :mode => 'diff', + :requirements => { :rev => /\d*/, :id => /[^\/]*/} + connect_to_web map, ':web/revision/:id/:rev', :controller => 'wiki', :action => 'revision', :requirements => { :rev => /\d*/, :id => /[^\/]*/} connect_to_web map, ':web/list/:category', :controller => 'wiki', :action => 'list', :requirements => { :category => /.*/}, :category => nil connect_to_web map, ':web/recently_revised/:category', :controller => 'wiki', :action => 'recently_revised', :requirements => { :category => /.*/}, :category => nil connect_to_web map, ':web/:action/:id', :controller => 'wiki', :requirements => {:id => /.*/}