Skip to content

Commit

Permalink
fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
rhartanto committed Feb 24, 2024
1 parent f09657d commit a22ff3a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/delayed/backend/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a22ff3a

Please # to comment.