Spaces:
Paused
Paused
File size: 418 Bytes
874ae95 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | class NotificationsController < ApplicationController
before_action :authenticate_user!
# GET /notifications/:id
def show
notification = authorize(current_user.notifications.find(params[:id]))
notification.touch(:read_at) if notification.read_at.blank? # rubocop:disable Rails/SkipsModelValidations
path = Notifications::ResolvePathService.new(notification).resolve
redirect_to(path)
end
end
|