Class: Workarea::Metadata::CatalogCategory
- Inherits:
-
Workarea::Metadata
- Object
- Workarea::Metadata
- Workarea::Metadata::CatalogCategory
- Defined in:
- app/queries/workarea/metadata/catalog_category.rb
Instance Attribute Summary
Attributes inherited from Workarea::Metadata
Instance Method Summary collapse
-
#description ⇒ String
Provides a default value for use as the html content meta tag using the top selling sub-categories (based on navigation structure).
-
#title ⇒ String
Provides a default value for use as the html page title using the name of the category and its top selling sub-categories.
Methods inherited from Workarea::Metadata
automation_klass, #initialize, model_name, update, #update
Constructor Details
This class inherits a constructor from Workarea::Metadata
Instance Method Details
#description ⇒ String
Provides a default value for use as the html content meta tag using the top selling sub-categories (based on navigation structure)
28 29 30 31 32 33 34 35 36 37 |
# File 'app/queries/workarea/metadata/catalog_category.rb', line 28 def description if top_taxons.present? description = [ I18n.t('workarea.metadata.shop_selection', name: model.name) ] description << top_taxons.map(&:name).to_sentence description.join(' ') end end |
#title ⇒ String
Provides a default value for use as the html page title using the name of the category and its top selling sub-categories
12 13 14 15 16 |
# File 'app/queries/workarea/metadata/catalog_category.rb', line 12 def title if top_taxons.present? "#{model.name}: #{top_taxons.map(&:name).to_sentence}" end end |