Class: ContentEmbedding::SiteMapEmbedding

Inherits:
ContentEmbedding
  • Object
show all
Includes:
TextSearchable
Defined in:
app/models/content_embedding/site_map_embedding.rb

Overview

ContentEmbedding STI subclass for site map embeddings.

Constant Summary

Constants included from TextSearchable

TextSearchable::SIMILARITY_THRESHOLD

Belongs to collapse

Class Method Summary collapse

Methods included from TextSearchable

apply_locale_filter, apply_published_filter, generate_text_query_embedding, semantic_search

Class Method Details

.locale_filtered?Boolean

SiteMap pages have locale-specific content

Returns:

  • (Boolean)


47
48
49
# File 'app/models/content_embedding/site_map_embedding.rb', line 47

def locale_filtered?
  true
end

.primary_contentActiveRecord::Relation<ContentEmbedding::SiteMapEmbedding>

A relation of ContentEmbedding::SiteMapEmbeddings that are primary content. Active Record Scope

Returns:

See Also:



43
# File 'app/models/content_embedding/site_map_embedding.rb', line 43

scope :primary_content, -> { where(content_type: 'primary') }

Instance Method Details

#embeddableSiteMap Also known as: site_map

Returns:

See Also:



38
# File 'app/models/content_embedding/site_map_embedding.rb', line 38

belongs_to :embeddable, class_name: 'SiteMap'