From 9f849875586669c277ee58ff21df6c2597d7629f Mon Sep 17 00:00:00 2001 From: lrbalt Date: Tue, 11 Mar 2008 20:19:53 +0000 Subject: [PATCH] changes route for tag view so you can use tags that contain dots. Fixes #655 git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@734 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/config/routes.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tracks/config/routes.rb b/tracks/config/routes.rb index 09319631..6e0e37a2 100644 --- a/tracks/config/routes.rb +++ b/tracks/config/routes.rb @@ -36,7 +36,12 @@ ActionController::Routing::Routes.draw do |map| todos.tickler 'tickler', :action => "list_deferred" todos.done 'done', :action => "completed" todos.done_archive 'done/archive', :action => "completed_archive" - todos.tag 'todos/tag/:name', :action => "tag" + + # This route works for tags with dots like /todos/tag/version1.5 + # please note that this pattern consumes everything after /todos/tag + # so /todos/tag/version1.5.xml will result in :name => 'version1.5.xml' + todos.tag 'todos/tag/:name', :action => "tag", :name => /.*/ + todos.mobile 'mobile', :action => "index", :format => 'm' todos.mobile_abbrev 'm', :action => "index", :format => 'm' todos.mobile_abbrev_new 'm/new', :action => "new", :format => 'm'