fix rubocop offenses

This commit is contained in:
Alexander Meindl 2022-08-23 18:49:31 +02:00
parent e51b812158
commit a86b85dcac

View File

@ -19,8 +19,8 @@ module Additionals
ids = entries.map(&:id)
journal_class = self == Issue ? Journal : "#{self}Journal".constantize
scope ||= journal_class.joins self.name.underscore.to_sym => :project
journal_ids = scope.where(journalized_type: self.to_s, journalized_id: ids)
scope ||= journal_class.joins name.underscore.to_sym => :project
journal_ids = scope.where(journalized_type: to_s, journalized_id: ids)
.where(journal_class.visible_notes_condition(user, skip_pre_condition: true))
.where.not(notes: '')
.group(:journalized_id)
@ -41,8 +41,8 @@ module Additionals
ids = entries.map(&:id)
journal_class = self == Issue ? Journal : "#{self}Journal".constantize
scope ||= journal_class.joins self.name.underscore.to_sym => :project
journals = scope.where(journalized_type: self.to_s, journalized_id: ids)
scope ||= journal_class.joins name.underscore.to_sym => :project
journals = scope.where(journalized_type: to_s, journalized_id: ids)
.where(journal_class.visible_notes_condition(user, skip_pre_condition: true))
.where.not(notes: '')
.group(:journalized_id)