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

module Admin
  class TracksController < Admin::BaseController
    load_and_authorize_resource :conference, fi
    
    def accept
      if @track.room && @track.start_date && @track.end_date
        update_state(:accept, "Track #{@track.name} accepted!")
      else
        flash[:alert] = 'Please make sure that the track has a room and start/end dates before accepting it'
        redirect_to edit_admin_conference_program_track_path(@conference.short_title, @track)
      end