Skip to content
Snippets Groups Projects
Commit f20a40f4 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Merge branch 'frozen-string-enable-app-models' into 'master'

Enable frozen string in app/models/*.rb

See merge request gitlab-org/gitlab-ce!20851
parents 2deb97ad 50abbd3e
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Showing
with 41 additions and 1 deletion
# frozen_string_literal: true
class DashboardMilestone < GlobalMilestone
def issues_finder_params
{ authorized_only: true }
Loading
Loading
# frozen_string_literal: true
class DeployKey < Key
include IgnorableColumn
 
Loading
Loading
# frozen_string_literal: true
class DeployKeysProject < ActiveRecord::Base
belongs_to :project
belongs_to :deploy_key, inverse_of: :deploy_keys_projects
Loading
Loading
# frozen_string_literal: true
class DeployToken < ActiveRecord::Base
include Expirable
include TokenAuthenticatable
Loading
Loading
# frozen_string_literal: true
class Deployment < ActiveRecord::Base
include AtomicInternalId
include IidRoutes
Loading
Loading
# frozen_string_literal: true
# A discussion on merge request or commit diffs consisting of `DiffNote` notes.
#
# A discussion of this type can be resolvable.
Loading
Loading
# frozen_string_literal: true
# A note on merge request or commit diffs
#
# A note of this type can be resolvable.
Loading
Loading
# frozen_string_literal: true
class DirectlyAddressedUser
class << self
def reference_pattern
Loading
Loading
# 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.
Loading
Loading
# 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.
Loading
Loading
# frozen_string_literal: true
class Email < ActiveRecord::Base
include Sortable
include Gitlab::SQL::Pattern
Loading
Loading
# frozen_string_literal: true
class Environment < ActiveRecord::Base
# Used to generate random suffixes for the slug
LETTERS = 'a'..'z'
Loading
Loading
@@ -173,7 +175,7 @@ class Environment < ActiveRecord::Base
# * 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])
Loading
Loading
# 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
Loading
Loading
# frozen_string_literal: true
class Event < ActiveRecord::Base
include Sortable
include IgnorableColumn
Loading
Loading
# 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.
Loading
Loading
# frozen_string_literal: true
class ExternalIssue
include Referable
 
Loading
Loading
# frozen_string_literal: true
class ForkNetwork < ActiveRecord::Base
belongs_to :root_project, class_name: 'Project'
has_many :fork_network_members
Loading
Loading
# frozen_string_literal: true
class ForkNetworkMember < ActiveRecord::Base
belongs_to :fork_network
belongs_to :project
Loading
Loading
# 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'
Loading
Loading
# frozen_string_literal: true
class GenericCommitStatus < CommitStatus
before_validation :set_default_values
 
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