From 6dce8d5d10d6142ce9a0826c7c7dd7d8064c48f9 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sat, 1 Dec 2007 20:48:47 +0000 Subject: [PATCH] ActionItem31: starting tag viewing --- app/controllers/public/tag_controller.rb | 5 +++++ config/routes.rb | 3 +++ test/integration/routing_test.rb | 4 ++++ 3 files changed, 12 insertions(+), 0 deletions(-) create mode 100644 app/controllers/public/tag_controller.rb diff --git a/app/controllers/public/tag_controller.rb b/app/controllers/public/tag_controller.rb new file mode 100644 index 0000000..ad1da14 --- /dev/null +++ b/app/controllers/public/tag_controller.rb @@ -0,0 +1,5 @@ +class TagController < ApplicationController + def index + raise 'pending' + end +end diff --git a/config/routes.rb b/config/routes.rb index 09dbcbf..3706c3c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -36,6 +36,9 @@ ActionController::Routing::Routes.draw do |map| map.connect 'cat', :controller => 'category', :action => 'index' map.category 'cat/*path', :controller => 'category', :action => 'view' + # tags + map.tag 'tag/:tag', :controller => 'tag', :action => 'index' + # 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 81d06f9..2daed91 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -89,4 +89,8 @@ class RoutingTest < ActionController::IntegrationTest assert_routing('/block/cojones/favorite_links_profile/save', :profile => 'cojones', :controller => 'favorite_links_profile', :action => 'save') end + def test_tag_viewing + assert_routing('/tag/umboraminhaporra', :controller => 'tag', :action => 'index', :tag => 'umboraminhaporra') + end + end -- libgit2 0.21.2