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: confirmations_controller.rb
    path of file: ./repos/push_type/auth/app/controllers/push_type
    
    the code of the file until where you have to start completion: module PushType
  class ConfirmationsController < Devise::ConfirmationsController
    layout 'push_type/auth'

    def show
      self.resource = resource_class.find_by_confirmation_token params[:confirmation_token]
    
    def update
      self.resource = resource_class.find_by_confirmation_token! user_params[:confirmation_token]
      resource.assign_attributes(user_params)

      if resource.valid?
        self.resource.confirm
        set_flash_message :notice, :confirmed
        sign_in_and_redirect resource_name, resource
      else
        render action: 'show'
      end