diff options
Diffstat (limited to 'app/models/page.rb')
| -rw-r--r-- | app/models/page.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/page.rb b/app/models/page.rb index c1498fc..817e3bd 100644 --- a/app/models/page.rb +++ b/app/models/page.rb | |||
| @@ -292,6 +292,10 @@ class Page < ApplicationRecord | |||
| 292 | end | 292 | end |
| 293 | end | 293 | end |
| 294 | 294 | ||
| 295 | def headline_asset | ||
| 296 | related_assets.find_by(headline: true)&.asset | ||
| 297 | end | ||
| 298 | |||
| 295 | # Returns true if a page has translations where one of them is significantly | 299 | # Returns true if a page has translations where one of them is significantly |
| 296 | # older than the other. | 300 | # older than the other. |
| 297 | # Takes the I18n.default locale and a second :locale to test if the | 301 | # Takes the I18n.default locale and a second :locale to test if the |
