Class: Workarea::Admin::BulkActionProductEditsController
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
#edit ⇒ Object
7
8
|
# File 'app/controllers/workarea/admin/bulk_action_product_edits_controller.rb', line 7
def edit
end
|
#publish ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'app/controllers/workarea/admin/bulk_action_product_edits_controller.rb', line 27
def publish
release = SavePublishing.new(nil, params).release
if release.nil? || release.valid?
@bulk_action.update_attributes(release_id: release.try(:id))
PublishBulkAction.perform_async(@bulk_action.id)
flash[:success] =
t('workarea.admin.bulk_action_product_edits.flash_messages.publish')
redirect_to catalog_products_path
else
flash[:error] = release.errors.full_messages
render :review
end
end
|
#review ⇒ Object
24
25
|
# File 'app/controllers/workarea/admin/bulk_action_product_edits_controller.rb', line 24
def review
end
|
#update ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'app/controllers/workarea/admin/bulk_action_product_edits_controller.rb', line 10
def update
@bulk_action.reset_to_default!
if @bulk_action.update_attributes(params[:bulk_action])
flash[:success] =
t('workarea.admin.bulk_action_product_edits.flash_messages.success')
redirect_to review_bulk_action_product_edit_path(@bulk_action)
else
flash[:error] =
t('workarea.admin.bulk_action_product_edits.flash_messages.error')
render :edit
end
end
|