From b93058b11df7ff9b02e08114cadb31d8375b771e Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 5 Mar 2023 14:01:56 +0100 Subject: [PATCH] Fix remaining lint errors --- app/models/comment.rb | 2 +- app/models/subscription.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index 830a6f4e..00472037 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -8,7 +8,7 @@ class Comment < ApplicationRecord validates :content, length: { maximum: 512 } after_create do - Subscription.subscribe self.user, answer + Subscription.subscribe user, answer Subscription.notify self, answer end diff --git a/app/models/subscription.rb b/app/models/subscription.rb index a94d95ab..507cc55c 100644 --- a/app/models/subscription.rb +++ b/app/models/subscription.rb @@ -32,7 +32,7 @@ class Subscription < ApplicationRecord { target_id: source.id, target_type: Comment, recipient_id: s.user_id, new: true, type: Notification::Commented } end - Notification.insert_all!(notifications) + Notification.insert_all!(notifications) # rubocop:disable Rails/SkipsModelValidations end def denotify(source, target)