Commit 17985317a0aa9ae3c7dbcc41f935f1b6cabc85bb
1 parent
ba7b6701
Exists in
master
and in
28 other branches
ActionItem31: putting tags in the search controller
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1023 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
config/routes.rb
@@ -37,8 +37,8 @@ ActionController::Routing::Routes.draw do |map| | @@ -37,8 +37,8 @@ ActionController::Routing::Routes.draw do |map| | ||
37 | map.category 'cat/*path', :controller => 'category', :action => 'view' | 37 | map.category 'cat/*path', :controller => 'category', :action => 'view' |
38 | 38 | ||
39 | # tags | 39 | # tags |
40 | - map.tag 'tag', :controller => 'tag', :action => 'index' | ||
41 | - map.tag 'tag/:tag', :controller => 'tag', :action => 'view' | 40 | + map.tag 'tag', :controller => 'search', :action => 'tags' |
41 | + map.tag 'tag/:tag', :controller => 'search', :action => 'tag' | ||
42 | 42 | ||
43 | # controllers for blocks | 43 | # controllers for blocks |
44 | map.controllers 'block/:profile/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_from_design_blocks | 44 | map.controllers 'block/:profile/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_from_design_blocks |
test/integration/routing_test.rb
@@ -90,8 +90,8 @@ class RoutingTest < ActionController::IntegrationTest | @@ -90,8 +90,8 @@ class RoutingTest < ActionController::IntegrationTest | ||
90 | end | 90 | end |
91 | 91 | ||
92 | def test_tag_viewing | 92 | def test_tag_viewing |
93 | - assert_routing('/tag', :controller => 'tag', :action => 'index') | ||
94 | - assert_routing('/tag/umboraminhaporra', :controller => 'tag', :action => 'view', :tag => 'umboraminhaporra') | 93 | + assert_routing('/tag', :controller => 'search', :action => 'tags') |
94 | + assert_routing('/tag/umboraminhaporra', :controller => 'search', :action => 'tag', :tag => 'umboraminhaporra') | ||
95 | end | 95 | end |
96 | 96 | ||
97 | end | 97 | end |