Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-03-31 06:06:09 +0300
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 19:44:14 +0300
commit21e10888c3fc0fe545c0443cf0e23f593df847a4 (patch)
treec6c89c2ea2c75ffae4529ab4dceb937ce2f6299a /app/models/concerns/resolvable_note.rb
parentfe26b8af94e8e12a66249e28e34196a4f8b987c4 (diff)
Address review comments
Diffstat (limited to 'app/models/concerns/resolvable_note.rb')
-rw-r--r--app/models/concerns/resolvable_note.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/concerns/resolvable_note.rb b/app/models/concerns/resolvable_note.rb
index 2aba979938b..1155ec22369 100644
--- a/app/models/concerns/resolvable_note.rb
+++ b/app/models/concerns/resolvable_note.rb
@@ -8,7 +8,9 @@ module ResolvableNote
validates :resolved_by, presence: true, if: :resolved?
- # Keep this scope in sync with the logic in `#potentially_resolvable?` in `Discussion` subclasses that are resolvable
+ # Keep this scope in sync with the logic in `#potentially_resolvable?` in `Discussion` subclasses that are resolvable.
+ # `RESOLVABLE_TYPES` should include names of all subclasses that are resolvable (where the method can return true), and
+ # the scope should also match the criteria `ResolvableDiscussion#potentially_resolvable?` puts on resolvability.
scope :potentially_resolvable, -> { where(type: RESOLVABLE_TYPES).where(noteable_type: 'MergeRequest') }
# Keep this scope in sync with `#resolvable?`
scope :resolvable, -> { potentially_resolvable.user }