🚨Fix Rubocop lint errors

This commit is contained in:
Pranav Raj S
2019-10-20 14:17:26 +05:30
committed by GitHub
parent dd018f3682
commit 94c6d6db6f
124 changed files with 774 additions and 914 deletions

View File

@@ -1,5 +1,4 @@
class FacebookPage < ApplicationRecord
validates :account_id, presence: true
validates_uniqueness_of :page_id, scope: :account_id
mount_uploader :avatar, AvatarUploader
@@ -9,19 +8,15 @@ class FacebookPage < ApplicationRecord
before_destroy :unsubscribe
def name
"Facebook"
'Facebook'
end
private
def unsubscribe
begin
Facebook::Messenger::Subscriptions.unsubscribe(access_token: page_access_token)
rescue => e
true
end
Facebook::Messenger::Subscriptions.unsubscribe(access_token: page_access_token)
rescue StandardError => e
true
end
end