Remove now unused `is_subscribed` method
This commit is contained in:
parent
0771c689ea
commit
904eab8daa
|
@ -7,15 +7,6 @@ class Subscription < ApplicationRecord
|
||||||
Subscription.where(answer: target)
|
Subscription.where(answer: target)
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_subscribed(recipient, target)
|
|
||||||
existing = Subscription.find_by(user: recipient, answer: target)
|
|
||||||
if existing.nil?
|
|
||||||
false
|
|
||||||
else
|
|
||||||
existing.is_active
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def subscribe(recipient, target, force = true)
|
def subscribe(recipient, target, force = true)
|
||||||
existing = Subscription.find_by(user: recipient, answer: target)
|
existing = Subscription.find_by(user: recipient, answer: target)
|
||||||
if existing.nil?
|
if existing.nil?
|
||||||
|
|
Loading…
Reference in New Issue