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/controllers/rss_controller.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'app/controllers/rss_controller.rb') diff --git a/app/controllers/rss_controller.rb b/app/controllers/rss_controller.rb index 70a642c..be9cd2c 100644 --- a/app/controllers/rss_controller.rb +++ b/app/controllers/rss_controller.rb @@ -7,10 +7,15 @@ class RssController < ApplicationController expires_in 31.minutes, :public => true I18n.locale = :de - - @items = Page.heads.tagged_with("update") + + @items = Page.heads + .joins("JOIN taggings ON taggings.taggable_id = pages.id + AND taggings.taggable_type = 'Page' + AND taggings.context = 'tags'") + .joins("JOIN tags ON tags.id = taggings.tag_id") + .where("LOWER(tags.name) = ?", "update") .order("published_at DESC").limit(20) - + respond_to do |format| format.xml {} format.rdf {} -- cgit v1.3