Commit 6833d6b2ba3814d0524f7e5d4375cfaab50d4122

Authored by AntonioTerceiro
1 parent 6dce8d5d

ActionItem31: index action to display a tag cloud and view for displaying a specific tag



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1015 3f533792-8f58-4932-b0fe-aaf55b0a4547
config/routes.rb
... ... @@ -37,7 +37,8 @@ ActionController::Routing::Routes.draw do |map|
37 37 map.category 'cat/*path', :controller => 'category', :action => 'view'
38 38  
39 39 # tags
40   - map.tag 'tag/:tag', :controller => 'tag', :action => 'index'
  40 + map.tag 'tag', :controller => 'tag', :action => 'index'
  41 + map.tag 'tag/:tag', :controller => 'tag', :action => 'view'
41 42  
42 43 # controllers for blocks
43 44 map.controllers 'block/:profile/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_from_design_blocks
... ...
test/integration/routing_test.rb
... ... @@ -90,7 +90,8 @@ class RoutingTest < ActionController::IntegrationTest
90 90 end
91 91  
92 92 def test_tag_viewing
93   - assert_routing('/tag/umboraminhaporra', :controller => 'tag', :action => 'index', :tag => 'umboraminhaporra')
  93 + assert_routing('/tag', :controller => 'tag', :action => 'index')
  94 + assert_routing('/tag/umboraminhaporra', :controller => 'tag', :action => 'view', :tag => 'umboraminhaporra')
94 95 end
95 96  
96 97 end
... ...