Commit c8bb359f authored by Stefan Hanreich's avatar Stefan Hanreich

chaining the methods in ref_slug

parent 071603a0
...@@ -189,9 +189,10 @@ module Ci ...@@ -189,9 +189,10 @@ module Ci
# * Maximum length is 63 bytes # * Maximum length is 63 bytes
# * First/Last Character is not a hyphen # * First/Last Character is not a hyphen
def ref_slug def ref_slug
slugified = ref.to_s.downcase ref.to_s
slugified.gsub!(/[^a-z0-9]/, '-') .downcase
slugified[0..62].gsub(/(\A-+|-+\z)/, '') .gsub(/[^a-z0-9]/, '-')[0..62]
.gsub(/(\A-+|-+\z)/, '')
end end
# Variables whose value does not depend on other variables # Variables whose value does not depend on other variables
......
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