From 500752ef8fd1e0e655d9f6054dab965c7c848cec Mon Sep 17 00:00:00 2001 From: Joenio Costa Date: Thu, 3 Mar 2011 11:50:32 -0300 Subject: [PATCH] Link to enterprise products point to manage_products controller --- app/helpers/search_helper.rb | 2 +- test/functional/catalog_controller_test.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 377c9b4..c1f6fde 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -65,7 +65,7 @@ module SearchHelper data << content_tag('strong', _('Address: ')) + profile.address + '
' end unless profile.products.empty? - data << content_tag('strong', _('Products/Services: ')) + profile.products.map{|i| link_to(i.name, :controller => 'catalog', :profile => profile.identifier, :action => 'show', :id => i.id)}.join(', ') + '
' + data << content_tag('strong', _('Products/Services: ')) + profile.products.map{|i| link_to(i.name, :controller => 'manage_products', :profile => profile.identifier, :action => 'show', :id => i.id)}.join(', ') + '
' end if profile.respond_to?(:distance) and !profile.distance.nil? data << content_tag('strong', _('Distance: ')) + "%.2f%" % profile.distance + '
' diff --git a/test/functional/catalog_controller_test.rb b/test/functional/catalog_controller_test.rb index b4000ef..3fbc747 100644 --- a/test/functional/catalog_controller_test.rb +++ b/test/functional/catalog_controller_test.rb @@ -87,4 +87,10 @@ class CatalogControllerTest < Test::Unit::TestCase assert_tag :a, :attributes => { :href => "http://" + url}, :content => url.scan(/.{4}/).join('​') end + should 'show action moved to manage_products controller' do + assert_raise ActionController::RoutingError do + get :show, :id => 1 + end + end + end -- libgit2 0.21.2