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

class Projects::TagsController < Projects::ApplicationController
  include SortingHelper

  prepend_before_action(only: [:index]) { authenticate_sessionless_user!(:rss) }

  # Authorize
  before_action :require_non_empty_project
  before_action :authorize_read_code!
  before_action :authorize_admin_tag!, only: [:new, :create, :destroy]

  feature_category :source_code_management
  urgency :low, [:new, :show, :index]

  # rubocop: disable CodeReuse/ActiveRecord
  def index
    begin
      tags_params = params
        .permit(:search, :sort, :per_page, :page_token, :page)
        .with_defaults(sort: sort_value_recently_updated)

      @so
    
  def create
    # TODO: remove this with the release creation moved to it's own form https://gitlab.com/gitlab-org/gitlab/-/issues/214245
    evidence_pipeline = find_evidence_pipeline

    result = ::Tags::CreateService.new(@project, current_user)
      .execute(params[:tag_name], params[:ref], params[:message])

    if result[:status] == :success
      # TODO: remove this with the release creation moved to it's own form https://gitlab.com/gitlab-org/gitlab/-/issues/214245
      if params[:release_description].present?
        release_params = {
          tag: params[:tag_name],
          name: params[:tag_name],
          description: params[:release_description],
          evidence_pipeline: evidence_pipeline
        }

        Releases::CreateService
          .new(@project, current_user, release_params)
          .execute
      end