saucy/app/controllers/notifications_controller.rb

20 lines
416 B
Ruby

class NotificationsController < ApplicationController
before_action :require_login
before_action :set_notification
# POST /notifications/1/deliver
def deliver
@notification.deliver!
redirect_to @notification.member
end
private
# Use callbacks to share common setup or constraints between actions.
def set_notification
@notification = Notification.find(params[:id])
end
end