diff --git a/config/routes.rb b/config/routes.rb index 3706c3c..48be574 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -37,7 +37,8 @@ ActionController::Routing::Routes.draw do |map| map.category 'cat/*path', :controller => 'category', :action => 'view' # tags - map.tag 'tag/:tag', :controller => 'tag', :action => 'index' + map.tag 'tag', :controller => 'tag', :action => 'index' + map.tag 'tag/:tag', :controller => 'tag', :action => 'view' # controllers for blocks map.controllers 'block/:profile/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_from_design_blocks diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index 2daed91..13a1bed 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -90,7 +90,8 @@ class RoutingTest < ActionController::IntegrationTest end def test_tag_viewing - assert_routing('/tag/umboraminhaporra', :controller => 'tag', :action => 'index', :tag => 'umboraminhaporra') + assert_routing('/tag', :controller => 'tag', :action => 'index') + assert_routing('/tag/umboraminhaporra', :controller => 'tag', :action => 'view', :tag => 'umboraminhaporra') end end -- libgit2 0.21.2