Class: QuickSearch::ArticlePresenter
- Inherits:
-
PinPresenter
- Object
- PinPresenter
- QuickSearch::ArticlePresenter
- Defined in:
- app/presenters/quick_search/article_presenter.rb
Overview
Presents an Article as a quick search result / pinned item.
Instance Method Summary collapse
-
#set_attributes ⇒ void
Sets the card title, truncated description sub-header, link, and id.
Instance Method Details
#set_attributes ⇒ void
This method returns an undefined value.
Sets the card title, truncated description sub-header, link, and id.
10 11 12 13 14 15 |
# File 'app/presenters/quick_search/article_presenter.rb', line 10 def set_attributes @title = result.subject @sub_header = result.description.truncate_words(6).html_safe @link = article_path(result) @reference_number = result.id end |