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 40 additions and 0 deletions
# frozen_string_literal: true
module Expirable
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
##
# This module is for replacing `dependent: :destroy` and `before_destroy` hooks.
#
Loading
Loading
# frozen_string_literal: true
module FasterCacheKeys
# A faster version of Rails' "cache_key" method.
#
Loading
Loading
# frozen_string_literal: true
module FeatureGate
def flipper_id
return nil if new_record?
Loading
Loading
# frozen_string_literal: true
module GhostUser
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
module GroupDescendant
# Returns the hierarchy of a project or group in the from of a hash upto a
# given top.
Loading
Loading
# frozen_string_literal: true
module HasStatus
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
module HasVariable
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
# Module that can be included into a model to make it easier to ignore database
# columns.
#
Loading
Loading
# frozen_string_literal: true
module IidRoutes
##
# This automagically enforces all related routes to use `iid` instead of `id`
Loading
Loading
# frozen_string_literal: true
module Importable
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
# == Issuable concern
#
# Contains common functionality shared between Issues and MergeRequests
Loading
Loading
# frozen_string_literal: true
module LoadedInGroupList
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
module ManualInverseAssociation
extend ActiveSupport::Concern
 
Loading
Loading
# frozen_string_literal: true
# == Mentionable concern
#
# Contains functionality related to objects that can mention Users, Issues, MergeRequests, Commits or Snippets by
Loading
Loading
# frozen_string_literal: true
module Mentionable
module ReferenceRegexes
def self.reference_pattern(link_patterns, issue_pattern)
Loading
Loading
# frozen_string_literal: true
module Milestoneish
def closed_items_count(user)
memoize_per_user(user, :closed_items_count) do
Loading
Loading
# frozen_string_literal: true
# Contains functionality shared between `DiffNote` and `LegacyDiffNote`.
module NoteOnDiff
extend ActiveSupport::Concern
Loading
Loading
# frozen_string_literal: true
module Noteable
# Names of all implementers of `Noteable` that support resolvable notes.
RESOLVABLE_TYPES = %w(MergeRequest).freeze
Loading
Loading
# frozen_string_literal: true
# == Participable concern
#
# Contains functionality related to objects that can have participants, such as
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