Skip to content
Snippets Groups Projects
Commit 15b878e2 authored by gfyoung's avatar gfyoung
Browse files

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

Partially addresses #47424.
parent b211f7c2
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Showing
with 43 additions and 2 deletions
# frozen_string_literal: true
# == AccessRequestable concern
#
# Contains functionality related to objects that can receive request for access.
Loading
Loading
# 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
Loading
Loading
# frozen_string_literal: true
# Include atomic internal id generation scheme for a model
#
# This allows us to atomically generate internal ids that are
Loading
Loading
# frozen_string_literal: true
module Avatarable
extend ActiveSupport::Concern
 
Loading
Loading
@@ -57,7 +59,8 @@ module Avatarable
only_path = false
end
 
url_base = ""
url_base = []
if use_asset_host
url_base << asset_host unless only_path
else
Loading
Loading
@@ -65,7 +68,7 @@ module Avatarable
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
Loading
Loading
# frozen_string_literal: true
module Awardable
extend ActiveSupport::Concern
 
Loading
Loading
# 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.
#
Loading
Loading
# frozen_string_literal: true
module BlobLike
extend ActiveSupport::Concern
include Linguist::BlobHelper
Loading
Loading
# frozen_string_literal: true
# Overrides `as_json` and `to_json` to raise an exception when called in order
# to prevent accidentally exposing attributes
#
Loading
Loading
# frozen_string_literal: true
# Returns and caches in thread max member access for a resource
#
module BulkMemberAccessLoad
Loading
Loading
# 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:
#
Loading
Loading
# frozen_string_literal: true
module CacheableAttributes
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
# Concern for querying columns with specific case sensitivity handling.
module CaseSensitivity
extend ActiveSupport::Concern
Loading
Loading
# frozen_string_literal: true
module ChronicDurationAttribute
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
module CreatedAtFilterable
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
module DeploymentPlatform
# EE would override this and utilize environment argument
# rubocop:disable Gitlab/ModuleWithInstanceVariables
Loading
Loading
# frozen_string_literal: true
module DiffFile
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
# Contains functionality shared between `DiffDiscussion` and `LegacyDiffDiscussion`.
module DiscussionOnDiff
extend ActiveSupport::Concern
Loading
Loading
# frozen_string_literal: true
module EachBatch
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
module Editable
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
module EnumWithNil
extend ActiveSupport::Concern
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment