Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfyoung <gfyoung17@gmail.com>2018-07-25 12:30:33 +0300
committergfyoung <gfyoung17@gmail.com>2018-07-27 02:55:41 +0300
commit50abbd3e53d4f5e3e67543650a13aca9a54b37c2 (patch)
tree4b36ec83d974102ab38738b05678e3f0f738a6f3 /app/models/environment.rb
parentcaeb4597a5b24e0eaa96b24901ce9208c2eef4bf (diff)
Enable frozen string in app/models/*.rb
Partially addresses #47424.
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r--app/models/environment.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb
index 4856d313318..c8d1d378ae0 100644
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Environment < ActiveRecord::Base
# Used to generate random suffixes for the slug
LETTERS = 'a'..'z'
@@ -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])