From a22ff3a243bb0efcd1c4412f22a5df4edcd0b491 Mon Sep 17 00:00:00 2001 From: Romi Hartanto Date: Sat, 24 Feb 2024 12:49:00 +1100 Subject: [PATCH] fix rubocop --- lib/delayed/backend/active_record.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/delayed/backend/active_record.rb b/lib/delayed/backend/active_record.rb index ab010416..b76c918e 100644 --- a/lib/delayed/backend/active_record.rb +++ b/lib/delayed/backend/active_record.rb @@ -57,9 +57,7 @@ class Job < ::ActiveRecord::Base def initialize(attributes = nil) # remove notes attributes if column doesnt exist # so we don't get ActiveModel::UnknownAttributeError (unknown attribute 'notes') - if !attributes.nil? && !self.respond_to?('notes') - attributes.delete(:notes) - end + attributes.delete(:notes) if !attributes.nil? && !respond_to?(:notes) super(attributes) end