Class: Www::SupportPublicationsComponent

Inherits:
ApplicationComponent show all
Includes:
ActionView::Helpers::UrlHelper
Defined in:
app/components/www/support_publications_component.rb

Overview

ViewComponent: renders the support publications block.

Instance Method Summary collapse

Methods inherited from ApplicationComponent

#cms_link, #fetch_or_fallback, #image_asset_tag, #image_tag, #number_to_currency, #number_with_delimiter, #post_path, #post_url, #strip_tags

Constructor Details

#initialize(publications_by_category:) ⇒ SupportPublicationsComponent

Returns a new instance of SupportPublicationsComponent.



7
8
9
10
# File 'app/components/www/support_publications_component.rb', line 7

def initialize(publications_by_category:)
  super()
  @publications_by_category = publications_by_category
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/components/www/support_publications_component.rb', line 12

def render?
  publications_by_category.present?
end