Class: Workarea::Admin::FulfillmentSkusController
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
#create ⇒ Object
16
17
18
19
20
21
22
23
24
|
# File 'app/controllers/workarea/admin/fulfillment_skus_controller.rb', line 16
def create
if @sku.save
flash[:success] =
t('workarea.admin.fulfillment_skus.flash_messages.created', id: @sku.id)
redirect_to fulfillment_sku_path(@sku)
else
render :new, status: :unprocessable_entity
end
end
|
#destroy ⇒ Object
37
38
39
40
41
42
|
# File 'app/controllers/workarea/admin/fulfillment_skus_controller.rb', line 37
def destroy
@sku.destroy
flash[:success] = t('workarea.admin.fulfillment_skus.flash_messages.removed', id: @sku.id)
redirect_to fulfillment_skus_path
end
|
#edit ⇒ Object
26
|
# File 'app/controllers/workarea/admin/fulfillment_skus_controller.rb', line 26
def edit; end
|
#index ⇒ Object
9
10
11
12
|
# File 'app/controllers/workarea/admin/fulfillment_skus_controller.rb', line 9
def index
search = Search::AdminFulfillmentSkus.new(view_model_options)
@search = SearchViewModel.new(search, view_model_options)
end
|
#show ⇒ Object
14
|
# File 'app/controllers/workarea/admin/fulfillment_skus_controller.rb', line 14
def show; end
|
#update ⇒ Object
28
29
30
31
32
33
34
35
|
# File 'app/controllers/workarea/admin/fulfillment_skus_controller.rb', line 28
def update
if @sku.update(params[:sku])
flash[:success] = t('workarea.admin.fulfillment_skus.flash_messages.saved', id: @sku.id)
redirect_to fulfillment_sku_path(@sku)
else
render :edit, status: :unprocessable_entity
end
end
|