diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-21 22:23:32 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-21 22:23:32 +0200 |
| commit | a2e4a1a5d3e73504e78461e0e39a3d24815b76d4 (patch) | |
| tree | c31409bc206f3a6c8741fa1c92abeb79061371ad /app/models | |
| parent | ec8329069d36cc6aa444c8a48b6b34a3e8f5c9d2 (diff) | |
Make PDFs eligible for headline and allow searching assets by filename
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/related_asset.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/related_asset.rb b/app/models/related_asset.rb index 62000cc..8f8d49c 100644 --- a/app/models/related_asset.rb +++ b/app/models/related_asset.rb | |||
| @@ -12,6 +12,6 @@ class RelatedAsset < ApplicationRecord | |||
| 12 | 12 | ||
| 13 | def headline_only_for_images | 13 | def headline_only_for_images |
| 14 | return unless asset | 14 | return unless asset |
| 15 | errors.add(:headline, "can only be set on image assets") if headline? && !asset.image? | 15 | errors.add(:headline, "can only be set on image or PDF assets") if headline? && !(asset.image? || asset.pdf?) |
| 16 | end | 16 | end |
| 17 | end | 17 | end |
