     redirect_to conn, "/flags/#{name}#actor_#{actor_id}"
   end
 
+
+  # to clear an actor gate
+  #
   delete "/flags/:name/actors/:actor_id" do
     flag_name = String.to_atom(name)
     gate = %FunWithFlags.Gate{type: :actor, for: actor_id, enabled: false}

    redirect_to conn, "/flags/#{name}"
  end

  patch "/flags/:name/actors/:actor_id" do
    enabled = Utils.parse_bool(conn.params["enabled"])
    flag_name = String.to_atom(name)

  end


  # get a list of the flags
  #
  get "/flags" do
    {:ok, flags} = FunWithFlags.all_flags
    flags = Utils.sort_flags(flags)
