Class: Workarea::Storefront::InventoryNotificationsController

Inherits:
Storefront::ApplicationController
  • Object
show all
Defined in:
app/controllers/workarea/storefront/inventory_notifications_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/workarea/storefront/inventory_notifications_controller.rb', line 7

def create
  @notification = InventoryNotification.new(notification_params)

  if @notification.save
    flash[:success] = t('workarea.storefront.inventory_notifications.flash_messages.saved')
    redirect_to storefront.product_path(@product)
  else
    flash[:error] = t('workarea.storefront.inventory_notifications.flash_messages.error')
    render :new
  end
end

#newObject



5
# File 'app/controllers/workarea/storefront/inventory_notifications_controller.rb', line 5

def new; end