Class: Workarea::Search::Admin::InventorySku
Instance Method Summary
collapse
#as_document, #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, #updated_at
all, #as_bulk_document, #as_document, current_index_prefix, #destroy, #initialize, #save
Instance Method Details
#facets ⇒ Object
25
26
27
|
# File 'app/models/workarea/search/admin/inventory_sku.rb', line 25
def facets
super.merge(policy: model.policy)
end
|
#jump_to_position ⇒ Object
21
22
23
|
# File 'app/models/workarea/search/admin/inventory_sku.rb', line 21
def jump_to_position
12
end
|
#jump_to_text ⇒ Object
13
14
15
16
17
18
19
|
# File 'app/models/workarea/search/admin/inventory_sku.rb', line 13
def jump_to_text
I18n.t(
'workarea.inventory_sku.jump_to_text',
id: model.id,
count: model.available_to_sell
)
end
|
#search_text ⇒ Object
9
10
11
|
# File 'app/models/workarea/search/admin/inventory_sku.rb', line 9
def search_text
model.name
end
|
#type ⇒ Object
5
6
7
|
# File 'app/models/workarea/search/admin/inventory_sku.rb', line 5
def type
'inventory_sku'
end
|