Class: QuickSearch::ArticlePresenter

Inherits:
PinPresenter
  • Object
show all
Defined in:
app/presenters/quick_search/article_presenter.rb

Overview

Presents an Article as a quick search result / pinned item.

See Also:

Instance Method Summary collapse

Instance Method Details

#set_attributesvoid

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