Class: Workarea::Search::Admin::ContentAsset
Instance Method Summary
collapse
#as_document, #created_at, for, #id, jump_to, #jump_to_param, #jump_to_route_helper, #jump_to_search_text, #keywords, #name, #releasable?, #sanitized_keywords, #type, #updated_at
all, #as_bulk_document, #as_document, current_index_prefix, #destroy, #initialize, #save
Instance Method Details
#facets ⇒ Object
26
27
28
|
# File 'app/models/workarea/search/admin/content_asset.rb', line 26
def facets
super.merge(file_type: model.type, image_dimensions: image_dimensions)
end
|
#jump_to_position ⇒ Object
22
23
24
|
# File 'app/models/workarea/search/admin/content_asset.rb', line 22
def jump_to_position
8
end
|
#jump_to_text ⇒ Object
18
19
20
|
# File 'app/models/workarea/search/admin/content_asset.rb', line 18
def jump_to_text
"#{model.name} - #{model.file_name}"
end
|
#search_text ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'app/models/workarea/search/admin/content_asset.rb', line 9
def search_text
[
'content asset',
model.name,
model.file_name,
model.tag_list
].join(' ')
end
|
#should_be_indexed? ⇒ Boolean
30
31
32
33
34
|
# File 'app/models/workarea/search/admin/content_asset.rb', line 30
def should_be_indexed?
!model.image_placeholder? &&
!model.open_graph_placeholder? &&
!model.favicon_placeholder?
end
|
#status ⇒ Object
5
6
7
|
# File 'app/models/workarea/search/admin/content_asset.rb', line 5
def status
'active'
end
|