Class: Workarea::Search::Admin::Release
Instance Method Summary
collapse
#created_at, find_for_model, for, #id, jump_to, #jump_to_param, #jump_to_route_helper, #jump_to_search_text, #keywords, #name, #releasable?, #sanitized_keywords, #should_be_indexed?, #status, #type, #updated_at
all, #as_bulk_document, current_index_prefix, #destroy, #initialize, #save
Instance Method Details
#as_document ⇒ Object
29
30
31
|
# File 'app/models/workarea/search/admin/release.rb', line 29
def as_document
super.merge(published_at: model.published_at)
end
|
#facets ⇒ Object
25
26
27
|
# File 'app/models/workarea/search/admin/release.rb', line 25
def facets
super.merge(publishing: model.statuses)
end
|
#jump_to_position ⇒ Object
21
22
23
|
# File 'app/models/workarea/search/admin/release.rb', line 21
def jump_to_position
13
end
|
#jump_to_text ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
|
# File 'app/models/workarea/search/admin/release.rb', line 9
def jump_to_text
tmp = model.name.dup
if model.publish_at.present?
tmp << " (#{model.publish_at.to_s(:short)})"
else
tmp << " (Not scheduled)"
end
tmp
end
|
#search_text ⇒ Object
5
6
7
|
# File 'app/models/workarea/search/admin/release.rb', line 5
def search_text
"release #{model.name}"
end
|