Class: Www::SupportArticlePresenter
- Inherits:
-
BasePresenter
- Object
- BasePresenter
- Www::SupportArticlePresenter
- Defined in:
- app/presenters/www/support_article_presenter.rb
Instance Method Summary collapse
- #breadcrumb(pl: nil) ⇒ Object
- #cache_key ⇒ Object
- #og_image ⇒ Object
- #page_description ⇒ Object
- #page_title ⇒ Object
Instance Method Details
#breadcrumb(pl: nil) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/presenters/www/support_article_presenter.rb', line 21 def (pl: nil) bcs = [{ name: 'Product Support', url: h.cms_link('/support') }] if (apl = pl || article.product_lines.first) bcs += h.(apl, section: :support) end bcs << { name: article.subject.to_s } h. bcs end |
#cache_key ⇒ Object
5 6 7 |
# File 'app/presenters/www/support_article_presenter.rb', line 5 def cache_key "#{I18n.locale}/#{article.cache_key}" end |
#og_image ⇒ Object
13 14 15 |
# File 'app/presenters/www/support_article_presenter.rb', line 13 def og_image # product_line&.primary_image&.image_url || DEFAULT_SOCIAL_ICON end |
#page_description ⇒ Object
9 10 11 |
# File 'app/presenters/www/support_article_presenter.rb', line 9 def page_description "Support Article on #{article.description}" end |
#page_title ⇒ Object
17 18 19 |
# File 'app/presenters/www/support_article_presenter.rb', line 17 def page_title "#{article.page_title} | #{h.company_locale}" end |