Class: Workarea::Admin::PricingOverridesController
- Inherits:
-
ApplicationController
- Object
- Workarea::ApplicationController
- ApplicationController
- Workarea::Admin::PricingOverridesController
- Defined in:
- app/controllers/workarea/admin/pricing_overrides_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
#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
Instance Method Details
#edit ⇒ Object
9 |
# File 'app/controllers/workarea/admin/pricing_overrides_controller.rb', line 9 def edit; end |
#update ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/workarea/admin/pricing_overrides_controller.rb', line 11 def update if @override.update(override_params) create_comment if params[:comment].present? && !request.xhr? update_pricing flash[:success] = t('workarea.admin.pricing_overrides.flash_messages.success') request.xhr? ? render(:edit) : redirect_to(storefront.cart_path) else flash[:error] = t('workarea.admin.pricing_overrides.flash_messages.error') render :edit end end |