From 3f3ef0041092c06ade35df5a0b278a4e79fc976c Mon Sep 17 00:00:00 2001 From: f Date: Wed, 22 Mar 2023 19:06:57 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20solo=20crear=20el=20c=C3=B3digo=20de=20c?= =?UTF-8?q?onducta=20si=20la=20plantilla=20lo=20soporta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit como fallback usamos page --- app/services/site_service.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/services/site_service.rb b/app/services/site_service.rb index 19b95302..e0fe17cd 100644 --- a/app/services/site_service.rb +++ b/app/services/site_service.rb @@ -143,13 +143,15 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do end def add_code_of_conduct + return unless site.layout?(:code_of_conduct) || site.layout?(:page) + # TODO: soportar más códigos de conducta coc = CodeOfConduct.first with_all_locales do |locale| params = ActionController::Parameters.new( post: { - layout: 'code_of_conduct', + layout: site.layout?(:code_of_conduct) ? 'code_of_conduct' : 'page', lang: locale.to_s, title: coc.title, description: coc.description,