Commit 771d820590b1cc5fbdc6188fa4b74a3029b45e92

Authored by AntonioTerceiro
1 parent ad63089b

ActionItem114: adding correct routing for controllers; still need to check how t…

…he links are created in plugin



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@847 3f533792-8f58-4932-b0fe-aaf55b0a4547
config/routes.rb
@@ -36,6 +36,9 @@ ActionController::Routing::Routes.draw do |map| @@ -36,6 +36,9 @@ ActionController::Routing::Routes.draw do |map|
36 map.connect 'cat', :controller => 'category', :action => 'index' 36 map.connect 'cat', :controller => 'category', :action => 'index'
37 map.category 'cat/*path', :controller => 'category', :action => 'view' 37 map.category 'cat/*path', :controller => 'category', :action => 'view'
38 38
  39 + ## controllers for blocks
  40 + map.controllers 'block/:controller/:action/:id', :controller => Noosfero.pattern_for_controllers_from_design_blocks
  41 +
39 ###################################################### 42 ######################################################
40 ## Controllers that are profile-specific (for profile admins ) 43 ## Controllers that are profile-specific (for profile admins )
41 ###################################################### 44 ######################################################
test/integration/routing_test.rb
@@ -84,7 +84,7 @@ class RoutingTest < ActionController::IntegrationTest @@ -84,7 +84,7 @@ class RoutingTest < ActionController::IntegrationTest
84 end 84 end
85 85
86 def test_routing_to_controllers_inside_design_blocks_directory 86 def test_routing_to_controllers_inside_design_blocks_directory
87 - flunk 'not implemented yet' 87 + assert_routing('/block/favourite_links/show/1', :controller => 'favourite_links', :action => 'show', :id => '1')
88 end 88 end
89 89
90 end 90 end