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/ifme/app/controllers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class NotificationsController < ApplicationController
  include NotificationsHelper
  before_action :set_notification, only: [:destroy]

  # DELETE /notifications/1
  # DELETE /notifications/1.json
  def destroy
    @notification.destroy if @notification.present?

    respond
    
  def render_notification(notification)
    uniqueid = notification[:uniqueid]
    data = convert_to_hash(notification[:data])
    # In case data[:name] is invalid
    data[:email] = User.find(data[:user_id]).email if data[:user_id]
    case data[:type]
    when /comment/ then comment_link(uniqueid, data)
    when /accepted_ally_request/ then accepted_ally_link(uniqueid, data)
    when /new_ally_request/ then new_ally_request_link(uniqueid, data)
    when /group/ then group_link(uniqueid, data)
    when /meeting/ then meeting_link(uniqueid, data)
    end