Commit 5e49ac9e authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'add-url-builder-comment' into 'master'

Add comment to justify the use of a case statement

Closes #217397

See merge request gitlab-org/gitlab!31738
parents a083a452 e8a7ac80
...@@ -11,6 +11,9 @@ module Gitlab ...@@ -11,6 +11,9 @@ module Gitlab
class << self class << self
include ActionView::RecordIdentifier include ActionView::RecordIdentifier
# Using a case statement here is preferable for readability and maintainability.
# See discussion in https://gitlab.com/gitlab-org/gitlab/-/issues/217397
#
# rubocop:disable Metrics/CyclomaticComplexity # rubocop:disable Metrics/CyclomaticComplexity
def build(object, **options) def build(object, **options)
# Objects are sometimes wrapped in a BatchLoader instance # Objects are sometimes wrapped in a BatchLoader instance
......
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