Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. class NotificationsController < ApplicationController
  2. def create
  3. NotificationsJob.perform_async(notification_params)
  4.  
  5. render json: { message: "Notifications sent" }, status: :ok
  6. end
  7.  
  8. private
  9.  
  10. def notification_params
  11. params.require(:notification).permit(:content, recipients: [])
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement