From 75670df5b8a5700c48ac8cb41f8d1732b5738402 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 24 Jun 2026 16:17:16 +0200 Subject: Fix tagged content aggregator, assets path, and add regression tests - Replace tagged_with calls in Page.aggregate, TagsController, RssController with direct SQL joins (acts-as-taggable-on 3.5 broken on Rails 3.2) - Fix Paperclip :path/:url to use plain :id format matching existing uploads - Add proper regression tests for aggregator, tags, and rss controllers - Fix assert_select assertions to target div.body div.article_partial --- app/helpers/link_helper.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/helpers') diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb index 1b20e6d..29c58f0 100644 --- a/app/helpers/link_helper.rb +++ b/app/helpers/link_helper.rb @@ -15,7 +15,8 @@ module LinkHelper def link_to_path title, path, html_options = {} if params[:page_path] - active = (params[:page_path].join("/") == path.sub(/^\//, "")) + page_path = params[:page_path].is_a?(Array) ? params[:page_path].join("/") : params[:page_path] + active = (page_path == path.sub(/^\//, "")) end active_class = active ? {:class => 'active'} : {:class => 'inactive'} @@ -29,7 +30,7 @@ module LinkHelper :controller => :content, :action => :render_page, :locale => params[:locale], - :page_path => (path.sub(/^\//, "").split("/") rescue "") + :page_path => (path.sub(/^\//, "") rescue "") }, html_options ) @@ -51,4 +52,4 @@ module LinkHelper ) end -end \ No newline at end of file +end -- cgit v1.3