diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 16:17:16 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 16:17:16 +0200 |
| commit | 75670df5b8a5700c48ac8cb41f8d1732b5738402 (patch) | |
| tree | 0611ab89cd9fa6aa5c1c7cc44df28de4388c608e /app/models/asset.rb | |
| parent | 61dc69cc5d8089ed9f96bc65dc64de6e075f70cf (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/models/asset.rb')
| -rw-r--r-- | app/models/asset.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/asset.rb b/app/models/asset.rb index d27c525..3ad5857 100644 --- a/app/models/asset.rb +++ b/app/models/asset.rb | |||
| @@ -2,9 +2,11 @@ class Asset < ActiveRecord::Base | |||
| 2 | 2 | ||
| 3 | has_many :related_assets, :dependent => :destroy | 3 | has_many :related_assets, :dependent => :destroy |
| 4 | has_many :pages, :through => :related_assets | 4 | has_many :pages, :through => :related_assets |
| 5 | 5 | ||
| 6 | has_attached_file( | 6 | has_attached_file( |
| 7 | :upload, | 7 | :upload, |
| 8 | :path => ":rails_root/public/system/:attachment/:id/:style/:filename", | ||
| 9 | :url => "/system/:attachment/:id/:style/:filename", | ||
| 8 | :styles => { | 10 | :styles => { |
| 9 | :medium => "300x300", | 11 | :medium => "300x300", |
| 10 | :thumb => "100x100", | 12 | :thumb => "100x100", |
