summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-24 16:17:16 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-24 16:17:16 +0200
commit75670df5b8a5700c48ac8cb41f8d1732b5738402 (patch)
tree0611ab89cd9fa6aa5c1c7cc44df28de4388c608e /app/helpers
parent61dc69cc5d8089ed9f96bc65dc64de6e075f70cf (diff)
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
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/link_helper.rb7
1 files changed, 4 insertions, 3 deletions
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
15 15
16 def link_to_path title, path, html_options = {} 16 def link_to_path title, path, html_options = {}
17 if params[:page_path] 17 if params[:page_path]
18 active = (params[:page_path].join("/") == path.sub(/^\//, "")) 18 page_path = params[:page_path].is_a?(Array) ? params[:page_path].join("/") : params[:page_path]
19 active = (page_path == path.sub(/^\//, ""))
19 end 20 end
20 21
21 active_class = active ? {:class => 'active'} : {:class => 'inactive'} 22 active_class = active ? {:class => 'active'} : {:class => 'inactive'}
@@ -29,7 +30,7 @@ module LinkHelper
29 :controller => :content, 30 :controller => :content,
30 :action => :render_page, 31 :action => :render_page,
31 :locale => params[:locale], 32 :locale => params[:locale],
32 :page_path => (path.sub(/^\//, "").split("/") rescue "") 33 :page_path => (path.sub(/^\//, "") rescue "")
33 }, 34 },
34 html_options 35 html_options
35 ) 36 )
@@ -51,4 +52,4 @@ module LinkHelper
51 ) 52 )
52 end 53 end
53 54
54end \ No newline at end of file 55end