Commit 810cbc51 authored by Siddharth Asthana's avatar Siddharth Asthana

Fix Gitlab/DelegatePredicateMethods offenses

Changelog: other
parent 70a1dc76
...@@ -6,7 +6,6 @@ Gitlab/DelegatePredicateMethods: ...@@ -6,7 +6,6 @@ Gitlab/DelegatePredicateMethods:
- app/models/concerns/ci/metadatable.rb - app/models/concerns/ci/metadatable.rb
- app/models/concerns/diff_positionable_note.rb - app/models/concerns/diff_positionable_note.rb
- app/models/concerns/integrations/base_data_fields.rb - app/models/concerns/integrations/base_data_fields.rb
- app/models/concerns/resolvable_discussion.rb
- app/models/project.rb - app/models/project.rb
- ee/app/models/concerns/ee/ci/metadatable.rb - ee/app/models/concerns/ee/ci/metadatable.rb
- ee/app/models/ee/group.rb - ee/app/models/ee/group.rb
......
...@@ -30,11 +30,14 @@ module ResolvableDiscussion ...@@ -30,11 +30,14 @@ module ResolvableDiscussion
delegate :resolved_at, delegate :resolved_at,
:resolved_by, :resolved_by,
:resolved_by_push?,
to: :last_resolved_note, to: :last_resolved_note,
allow_nil: true allow_nil: true
end end
def resolved_by_push?
!!last_resolved_note&.resolved_by_push?
end
def resolvable? def resolvable?
strong_memoize(:resolvable) do strong_memoize(:resolvable) do
potentially_resolvable? && notes.any?(&:resolvable?) potentially_resolvable? && notes.any?(&:resolvable?)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment