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: banners_controller.rb
    path of file: ./repos/casa/app/controllers
    
    the code of the file until where you have to start completion: class BannersController < ApplicationController
  after_action :verify_authorized, except: %i[dismiss]
  before_action :set_banner, only: %i[edit update destroy dismiss
    
  def update
    authorize :application, :admin_or_supervisor?

    Banner.transaction do
      deactivate_alternate_active_banner
      @banner.update!(banner_params)
    end

    redirect_to banners_path
  rescue
    render :edit
  end