The code powering m.abunchtell.com https://m.abunchtell.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

19 satır
448 B

  1. # frozen_string_literal: true
  2. class UnfavouriteService < BaseService
  3. def call(account, status)
  4. favourite = Favourite.find_by!(account: account, status: status)
  5. favourite.destroy!
  6. NotificationWorker.perform_async(build_xml(favourite), account.id, status.account_id) unless status.local?
  7. favourite
  8. end
  9. private
  10. def build_xml(favourite)
  11. AtomSerializer.render(AtomSerializer.new.unfavourite_salmon(favourite))
  12. end
  13. end