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

# For toggle switch previews/tests
# :nocov:
class ToggleSwitchController < ApplicationController
  class << self
    attr_accessor :last_request
  end

  skip_before_action :verify_authenticity_to
    
  def verify_artificial_authenticity_token
    # don't check token if not provided
    return unless form_params[:authenticity_token]

    # if provided, check token
    return if form_params[:authenticity_token] == "let_me_in"

    render status: :unauthorized, plain: "Bad CSRF token"
  end

  def form_params
    params.permit(:value, :authenticity_token)
  end
end