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: transformations_controller.rb
    path of file: ./repos/mushroom-observer/app/controllers/images
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Images
  class TransformationsController < ApplicationController
    before_action :login_required

    # Used by show_image to rotate and flip image. was GET. C
    
    def update
      pass_query_params
      image = find_or_goto_index(Image, params[:id].to_s)
      return unless image

      transform_image_and_flash_notices(image) if check_permission!(image)

      # NOTE: 2022/12 params[:size] is unused in show_image
      redirect_with_query(image_path(image))
    end