diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-30 16:50:19 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-30 16:50:19 +0200 |
| commit | 37c542bee952193ebfbced8529b8699e2712fdc8 (patch) | |
| tree | df8d70c586002a08b85ba1143a93f9444215ff63 /app/models/related_asset.rb | |
| parent | 970f0daaa7097d1a34cf3daa6266b80b93c190a9 (diff) | |
Localise model validation messages and refusal reasons
Diffstat (limited to 'app/models/related_asset.rb')
| -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 8f8d49cb..caf8afda 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 or PDF assets") if headline? && !(asset.image? || asset.pdf?) | 15 | errors.add(:headline, :images_and_pdfs_only) if headline? && !(asset.image? || asset.pdf?) |
| 16 | end | 16 | end |
| 17 | end | 17 | end |
