diff --git a/config/routes.rb b/config/routes.rb index c8e77ea..ff0df27 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -28,7 +28,8 @@ ActionController::Routing::Routes.draw do |map| # tags map.tag 'tag', :controller => 'search', :action => 'tags' - map.tag 'tag/:tag', :controller => 'search', :action => 'tag' + map.tag 'tag/:tag', :controller => 'search', :action => 'tag', :tag => /.*/ + # categories index map.category 'cat/*category_path', :controller => 'search', :action => 'category_index' map.assets 'assets/:asset/*category_path', :controller => 'search', :action => 'assets' @@ -38,7 +39,7 @@ ActionController::Routing::Routes.draw do |map| # public profile information - map.profile 'profile/:profile/:action/:id', :controller => 'profile', :action => 'index' + map.profile 'profile/:profile/:action/:id', :controller => 'profile', :action => 'index', :id => /.*/ ###################################################### ## Controllers that are profile-specific (for profile admins ) diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index 613c4fb..1869ede 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -85,10 +85,18 @@ class RoutingTest < ActionController::IntegrationTest assert_routing('/tag/umboraminhaporra', :controller => 'search', :action => 'tag', :tag => 'umboraminhaporra') end + def test_view_tag_with_dot + assert_routing('/tag/tag.withdot', :controller => 'search', :action => 'tag', :tag => 'tag.withdot') + end + def test_profile_routing assert_routing('/profile/ze', :controller => 'profile', :profile => 'ze', :action => 'index') assert_routing('/profile/ze/friends', :controller => 'profile', :profile => 'ze', :action => 'friends') end + + def test_profile_route_for_tags_with_dot + assert_routing('/profile/ze/tag/tag.withdot', :controller => 'profile', :profile => 'ze', :action => 'tag', :id => 'tag.withdot') + end def test_search_routing assert_routing('/search', :controller => 'search', :action => 'index', :category_path => []) -- libgit2 0.21.2