Remove unused `destruct_by` method
This commit is contained in:
parent
f73fc87991
commit
36d59d100e
|
@ -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?
|
||||
|
||||
|
|
Loading…
Reference in New Issue