diff options
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r-- | app/models/environment.rb | 4 |
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]) |