Commit 7494e171 authored by gfyoung's avatar gfyoung
Browse files

Enable frozen string in app/models/*.rb

Partially addresses #47424.
parent afa505583336
# frozen_string_literal: true
class DashboardMilestone < GlobalMilestone
def issues_finder_params
{ authorized_only: true }
......
# frozen_string_literal: true
class DeployKey < Key
include IgnorableColumn
......
# frozen_string_literal: true
class DeployKeysProject < ActiveRecord::Base
belongs_to :project
belongs_to :deploy_key, inverse_of: :deploy_keys_projects
......
# frozen_string_literal: true
class DeployToken < ActiveRecord::Base
include Expirable
include TokenAuthenticatable
......
# frozen_string_literal: true
class Deployment < ActiveRecord::Base
include AtomicInternalId
include IidRoutes
......
# frozen_string_literal: true
# A discussion on merge request or commit diffs consisting of `DiffNote` notes.
#
# A discussion of this type can be resolvable.
......
# frozen_string_literal: true
# A note on merge request or commit diffs
#
# A note of this type can be resolvable.
......
# frozen_string_literal: true
class DirectlyAddressedUser
class << self
def reference_pattern
......
# frozen_string_literal: true
# A non-diff discussion on an issue, merge request, commit, or snippet, consisting of `DiscussionNote` notes.
#
# A discussion of this type can be resolvable.
......
# frozen_string_literal: true
# A note in a non-diff discussion on an issue, merge request, commit, or snippet.
#
# A note of this type can be resolvable.
......
# frozen_string_literal: true
class Email < ActiveRecord::Base
include Sortable
include Gitlab::SQL::Pattern
......
# frozen_string_literal: true
class Environment < ActiveRecord::Base
# Used to generate random suffixes for the slug
LETTERS = 'a'..'z'
......@@ -173,7 +175,7 @@ def slug
# * cannot end with `-`
def generate_slug
# Lowercase letters and numbers only
slugified = name.to_s.downcase.gsub(/[^a-z0-9]/, '-')
slugified = +name.to_s.downcase.gsub(/[^a-z0-9]/, '-')
# Must start with a letter
slugified = 'env-' + slugified unless LETTERS.cover?(slugified[0])
......
# frozen_string_literal: true
# Placeholder class for model that is implemented in EE
# It reserves '&' as a reference prefix, but the table does not exists in CE
class Epic < ActiveRecord::Base
......
# frozen_string_literal: true
class Event < ActiveRecord::Base
include Sortable
include IgnorableColumn
......
# frozen_string_literal: true
# A collection of events to display in an event list.
#
# An EventCollection is meant to be used for displaying events to a user (e.g.
......
# frozen_string_literal: true
class ExternalIssue
include Referable
......
# frozen_string_literal: true
class ForkNetwork < ActiveRecord::Base
belongs_to :root_project, class_name: 'Project'
has_many :fork_network_members
......
# frozen_string_literal: true
class ForkNetworkMember < ActiveRecord::Base
belongs_to :fork_network
belongs_to :project
......
# frozen_string_literal: true
class ForkedProjectLink < ActiveRecord::Base
belongs_to :forked_to_project, -> { where.not(pending_delete: true) }, class_name: 'Project'
belongs_to :forked_from_project, -> { where.not(pending_delete: true) }, class_name: 'Project'
......
# frozen_string_literal: true
class GenericCommitStatus < CommitStatus
before_validation :set_default_values
......
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