From cb9fcfdfd823c32c907da9d01ad6f9d6d666fd6b Mon Sep 17 00:00:00 2001 From: f Date: Tue, 17 Sep 2019 20:39:37 -0300 Subject: [PATCH] no guardar el valor de saved en la configuracion --- app/models/site/config.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/site/config.rb b/app/models/site/config.rb index f4bf041e..fb357790 100644 --- a/app/models/site/config.rb +++ b/app/models/site/config.rb @@ -8,7 +8,7 @@ class Site # Iniciar el OpenStruct con el sitio super(site: site) - self.saved = File.exist? path + @saved = File.exist? path read end @@ -33,8 +33,8 @@ class Site def write return if persisted? - self.saved = Site::Writer.new(site: site, file: path, - content: content.to_yaml).save + @saved = Site::Writer.new(site: site, file: path, + content: content.to_yaml).save # Actualizar el hash para no escribir dos veces @hash = content.hash end @@ -42,7 +42,7 @@ class Site # Detecta si la configuración cambió comparando con el valor inicial def persisted? - (@hash == content.hash) && saved + (@hash == content.hash) && @saved end # Obtener el contenido de la configuración como un hash, sin el