diff options
author | alpaca-tc <alpaca-tc@alpaca.tc> | 2017-04-15 20:16:24 +0900 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-15 13:16:24 +0200 |
commit | f9d7ec89711e29a7c1fdf060abf9599b65c9f515 (patch) | |
tree | f5a93d2a5bf474eb5d91d2cc0aff9ecf0fd61ed2 /app/services/pubsubhubbub | |
parent | 40fd1de4889584900eeea26514c251ca62fa95f5 (diff) |
ActiveRecord::Relation does not respond to `#id` (#1834)
Diffstat (limited to 'app/services/pubsubhubbub')
-rw-r--r-- | app/services/pubsubhubbub/unsubscribe_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/pubsubhubbub/unsubscribe_service.rb b/app/services/pubsubhubbub/unsubscribe_service.rb index 62459a0aa..7adadf8ed 100644 --- a/app/services/pubsubhubbub/unsubscribe_service.rb +++ b/app/services/pubsubhubbub/unsubscribe_service.rb @@ -4,7 +4,7 @@ class Pubsubhubbub::UnsubscribeService < BaseService def call(account, callback) return ['Invalid topic URL', 422] if account.nil? - subscription = Subscription.where(account: account, callback_url: callback) + subscription = Subscription.find_by(account: account, callback_url: callback) unless subscription.nil? Pubsubhubbub::ConfirmationWorker.perform_async(subscription.id, 'unsubscribe') |