Commit c9dd2528 authored by Markus Koller's avatar Markus Koller

Merge branch 'issue_324629_resolvable_discussion' into 'master'

Fix Gitlab/DelegatePredicateMethods offenses

See merge request gitlab-org/gitlab!76003
parents 636fb031 810cbc51
......@@ -4,7 +4,6 @@ Gitlab/DelegatePredicateMethods:
- app/models/clusters/cluster.rb
- app/models/concerns/ci/metadatable.rb
- app/models/concerns/integrations/base_data_fields.rb
- app/models/concerns/resolvable_discussion.rb
- app/models/project.rb
- ee/app/models/concerns/ee/ci/metadatable.rb
- ee/app/models/ee/namespace.rb
......
......@@ -30,11 +30,14 @@ module ResolvableDiscussion
delegate :resolved_at,
:resolved_by,
:resolved_by_push?,
to: :last_resolved_note,
allow_nil: true
end
def resolved_by_push?
!!last_resolved_note&.resolved_by_push?
end
def resolvable?
strong_memoize(:resolvable) do
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