You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: notifications_controller.rb
    path of file: ./repos/railsdevs.com/app/controllers
    
    the code of the file until where you have to start completion: class NotificationsController < ApplicationController
  include Pagy::Backend

  before_action :authenticat
    
  def show
    notification = current_user.notifications.find(params[:id])
    notification.mark_as_read!

    if (url = notification.to_notification.url)
      redirect_to url
    else
      redirect_to notifications_path, notice: t(".notice")
    end