Class: Spree::Admin::NotificationSenderController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/admin/notification_sender_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



4
5
6
7
8
9
10
11
# File 'app/controllers/spree/admin/notification_sender_controller.rb', line 4

def create
  customer_notification_id = params[:notification_id]
  user_ids = params[:send_all] == 'true' ? nil : params[:user_ids]

  SpreeCmCommissioner::CustomerNotificationSenderJob.perform_later(customer_notification_id, user_ids)

  redirect_to admin_customer_notifications_path
end