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,