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

class SubscriptionsController < ApplicationController
  include TurboStreamable

  be
    
  def destroy
    answer = Answer.find(params[:answer])
    result = Subscription.unsubscribe(current_user, answer)

    respond_to do |format|
      format.turbo_stream do
        render turbo_stream: [
          turbo_stream.replace("subscription-#{answer.id}", partial: "subscriptions/create", locals: { answer: }),
          render_toast(t(result.present? ? ".success" : ".error"), result.present?)
        ]
      end

      format.html { redirect_to answer_path(username: answer.user.screen_name, id: answer.id) }
    end
  end