Commit a1a9445f authored by gfyoung's avatar gfyoung
Browse files

Enable more frozen string in app/models/**/*.rb

Partially addresses #47424.
parent 7f83cc632dfc
# frozen_string_literal: true
# == AccessRequestable concern
#
# Contains functionality related to objects that can receive request for access.
......
# frozen_string_literal: true
# Adapter class to unify the interface between mounted uploaders and the
# Ci::Artifact model
# Meant to be prepended so the interface can stay the same
......
# frozen_string_literal: true
# Include atomic internal id generation scheme for a model
#
# This allows us to atomically generate internal ids that are
......
# frozen_string_literal: true
module Avatarable
extend ActiveSupport::Concern
......@@ -57,7 +59,8 @@ def avatar_path(only_path: true, size: nil)
only_path = false
end
url_base = ""
url_base = []
if use_asset_host
url_base << asset_host unless only_path
else
......@@ -65,7 +68,7 @@ def avatar_path(only_path: true, size: nil)
url_base << gitlab_config.relative_url_root
end
url_base + avatar.local_url + query_params
url_base.join + avatar.local_url + query_params
end
# Path that is persisted in the tracking Upload model. Used to fetch the
......
# frozen_string_literal: true
module Awardable
extend ActiveSupport::Concern
......
# frozen_string_literal: true
# Provides a way to work around Rails issue where dependent objects are all
# loaded into memory before destroyed: https://github.com/rails/rails/issues/22510.
#
......
# frozen_string_literal: true
module BlobLike
extend ActiveSupport::Concern
include Linguist::BlobHelper
......
# frozen_string_literal: true
# Overrides `as_json` and `to_json` to raise an exception when called in order
# to prevent accidentally exposing attributes
#
......
# frozen_string_literal: true
# Returns and caches in thread max member access for a resource
#
module BulkMemberAccessLoad
......
# frozen_string_literal: true
# This module takes care of updating cache columns for Markdown-containing
# fields. Use like this in the body of your class:
#
......
# frozen_string_literal: true
module CacheableAttributes
extend ActiveSupport::Concern
......
# frozen_string_literal: true
# Concern for querying columns with specific case sensitivity handling.
module CaseSensitivity
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module ChronicDurationAttribute
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module CreatedAtFilterable
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module DeploymentPlatform
# EE would override this and utilize environment argument
# rubocop:disable Gitlab/ModuleWithInstanceVariables
......
# frozen_string_literal: true
module DiffFile
extend ActiveSupport::Concern
......
# frozen_string_literal: true
# Contains functionality shared between `DiffDiscussion` and `LegacyDiffDiscussion`.
module DiscussionOnDiff
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EachBatch
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module Editable
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module EnumWithNil
extend ActiveSupport::Concern
......
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