From f8f9e722be6302d43b0ca6f23124578c43112d0d Mon Sep 17 00:00:00 2001 From: f Date: Sat, 7 Aug 2021 17:37:19 -0300 Subject: [PATCH] Permitir asignar un hostname al iniciar --- app/models/deploy.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/deploy.rb b/app/models/deploy.rb index cd709072..0da07be9 100644 --- a/app/models/deploy.rb +++ b/app/models/deploy.rb @@ -118,11 +118,12 @@ class Deploy < ApplicationRecord private - # Genera el hostname + # Genera el hostname pero permitir la inicialización del valor. Luego + # validamos que sea el formato correcto. # # @return [Boolean] def default_hostname! - self.hostname = default_hostname + self.hostname ||= default_hostname true end