From c17cd0ac274eac564bb5ee8735cee23dacdf8d34 Mon Sep 17 00:00:00 2001 From: jazzari Date: Fri, 18 Aug 2023 17:37:40 -0300 Subject: [PATCH] feat: add boolean method for automatic publications #13244 --- app/models/site.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/models/site.rb b/app/models/site.rb index 24644b9c..d5b4c6cb 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -2,7 +2,9 @@ # Un sitio es un directorio dentro del directorio de sitios de cada # Usuaria -class Site < ApplicationRecord +class def create_njalla_records? + !site.name.end_with?('.') +end < ApplicationRecord include FriendlyId include Site::Forms include Site::FindAndReplace @@ -461,6 +463,11 @@ class Site < ApplicationRecord @docs = nil end + # @return [Boolean] + def automatic_publication? + @auto_publ = false + end + private # Asegurarse que el sitio tenga una llave privada