gab-social/app/services/unfavourite_service.rb

10 lines
214 B
Ruby

# frozen_string_literal: true
class UnfavouriteService < BaseService
def call(account, status)
favourite = Favourite.find_by!(account: account, status: status)
favourite.destroy!
favourite
end
end