From 6833d6b2ba3814d0524f7e5d4375cfaab50d4122 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sat, 1 Dec 2007 20:51:17 +0000 Subject: [PATCH] ActionItem31: index action to display a tag cloud and view for displaying a specific tag --- config/routes.rb | 3 ++- test/integration/routing_test.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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