Class: Workarea::Admin::CatalogCategoriesController
Instance Method Summary
collapse
#current_user, #find_sort, #wrap_in_view_model, wrap_in_view_model
Methods included from Publishing
#allow_publishing!, #allow_publishing?, #set_publishing_options
Methods included from Visiting
#most_visited
Instance Method Details
#destroy ⇒ Object
42
43
44
45
46
|
# File 'app/controllers/workarea/admin/catalog_categories_controller.rb', line 42
def destroy
@category.destroy
flash[:success] = t('workarea.admin.catalog_categories.flash_messages.removed')
redirect_to catalog_categories_path
end
|
#edit ⇒ Object
24
25
|
# File 'app/controllers/workarea/admin/catalog_categories_controller.rb', line 24
def edit
end
|
#index ⇒ Object
10
11
12
13
14
15
16
17
18
19
|
# File 'app/controllers/workarea/admin/catalog_categories_controller.rb', line 10
def index
search = Search::AdminCategories.new(
params.merge(
autocomplete: request.xhr?,
exclude_ids: exclude_ids
)
)
@search = SearchViewModel.new(search, view_model_options)
end
|
#insights ⇒ Object
39
40
|
# File 'app/controllers/workarea/admin/catalog_categories_controller.rb', line 39
def insights
end
|
#show ⇒ Object
21
22
|
# File 'app/controllers/workarea/admin/catalog_categories_controller.rb', line 21
def show
end
|
#update ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
|
# File 'app/controllers/workarea/admin/catalog_categories_controller.rb', line 27
def update
set_range_facets
@category.save
if @category.update_attributes(params[:category])
flash[:success] = t('workarea.admin.catalog_categories.flash_messages.saved')
redirect_to catalog_category_path(@category)
else
render :edit, status: :unprocessable_entity
end
end
|