Remove unused `destruct_by` method

This commit is contained in:
Karina Kwiatek 2023-03-05 13:48:27 +01:00
parent f73fc87991
commit 36d59d100e
1 changed files with 0 additions and 9 deletions

View File

@ -26,15 +26,6 @@ class Subscription < ApplicationRecord
Subscription.where(answer: target).destroy_all
end
def destruct_by(recipient, target)
if recipient.nil? or target.nil?
return nil
end
subs = Subscription.find_by(user: recipient, answer: target)
subs.destroy unless subs.nil?
end
def notify(source, target)
return nil if source.nil? || target.nil?