Class: Www::SupportPublicationsComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Www::SupportPublicationsComponent
- Includes:
- ActionView::Helpers::UrlHelper
- Defined in:
- app/components/www/support_publications_component.rb
Overview
ViewComponent: renders the support publications block.
Instance Method Summary collapse
-
#initialize(publications_by_category:) ⇒ SupportPublicationsComponent
constructor
A new instance of SupportPublicationsComponent.
-
#render? ⇒ Boolean
Whether the component should render.
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.
8 9 10 11 |
# File 'app/components/www/support_publications_component.rb', line 8 def initialize(publications_by_category:) super() @publications_by_category = publications_by_category end |
Instance Method Details
#render? ⇒ Boolean
Whether the component should render.
15 16 17 |
# File 'app/components/www/support_publications_component.rb', line 15 def render? publications_by_category.present? end |