diff --git a/lib/chunks/category.rb b/lib/chunks/category.rb index 351ac51d..ddc05f99 100644 --- a/lib/chunks/category.rb +++ b/lib/chunks/category.rb @@ -33,6 +33,6 @@ def initialize(match_data, content) # TODO move presentation of page metadata to controller/view def url(category) %{#{category}} + :action => 'list', :only_path => true}/#{CGI.escape(category)}">#{category}} end end diff --git a/test/test_helper.rb b/test/test_helper.rb index 17f5e5ef..77be2e46 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -123,7 +123,7 @@ class StubUrlGenerator < AbstractUrlGenerator def url_for(hash = {}) if(hash[:action] == 'list') - "http://example.com/#{hash[:web]}/list" + "/#{hash[:web]}/list" else '../files/pngs' end diff --git a/test/unit/chunks/category_test.rb b/test/unit/chunks/category_test.rb index 3997a37b..923a4a16 100755 --- a/test/unit/chunks/category_test.rb +++ b/test/unit/chunks/category_test.rb @@ -8,9 +8,9 @@ class CategoryTest < Test::Unit::TestCase def test_single_category match(Category, 'category: test', :list => ['test'], :hidden => nil, :unmask_text => - "