Class: Crm::SeoDashboardComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Crm::SeoDashboardComponent
- Includes:
- ActionView::Helpers::NumberHelper
- Defined in:
- app/components/crm/seo_dashboard_component.rb
Overview
Displays SEO metrics and analysis for a SiteMap record.
Reusable component for blog posts, products, and other content types.
Instance Method Summary collapse
-
#initialize(site_map:, show_analyze_button: true) ⇒ SeoDashboardComponent
constructor
A new instance of SeoDashboardComponent.
-
#render? ⇒ Boolean
Whether the component should render at all.
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(site_map:, show_analyze_button: true) ⇒ SeoDashboardComponent
Returns a new instance of SeoDashboardComponent.
21 22 23 24 25 |
# File 'app/components/crm/seo_dashboard_component.rb', line 21 def initialize(site_map:, show_analyze_button: true) super() @site_map = site_map @show_analyze_button = end |
Instance Method Details
#render? ⇒ Boolean
Whether the component should render at all.
29 30 31 |
# File 'app/components/crm/seo_dashboard_component.rb', line 29 def render? @site_map.present? end |