Commit 6dce8d5d10d6142ce9a0826c7c7dd7d8064c48f9

Authored by AntonioTerceiro
1 parent 1a7a27de

ActionItem31: starting tag viewing



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1014 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/public/tag_controller.rb 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +class TagController < ApplicationController
  2 + def index
  3 + raise 'pending'
  4 + end
  5 +end
... ...
config/routes.rb
... ... @@ -36,6 +36,9 @@ ActionController::Routing::Routes.draw do |map|
36 36 map.connect 'cat', :controller => 'category', :action => 'index'
37 37 map.category 'cat/*path', :controller => 'category', :action => 'view'
38 38  
  39 + # tags
  40 + map.tag 'tag/:tag', :controller => 'tag', :action => 'index'
  41 +
39 42 # controllers for blocks
40 43 map.controllers 'block/:profile/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_from_design_blocks
41 44  
... ...
test/integration/routing_test.rb
... ... @@ -89,4 +89,8 @@ class RoutingTest &lt; ActionController::IntegrationTest
89 89 assert_routing('/block/cojones/favorite_links_profile/save', :profile => 'cojones', :controller => 'favorite_links_profile', :action => 'save')
90 90 end
91 91  
  92 + def test_tag_viewing
  93 + assert_routing('/tag/umboraminhaporra', :controller => 'tag', :action => 'index', :tag => 'umboraminhaporra')
  94 + end
  95 +
92 96 end
... ...