From 98df0ceb3a1ef23a5f7d444f23176da5de86c446 Mon Sep 17 00:00:00 2001 From: f Date: Sun, 9 May 2021 12:25:16 -0300 Subject: [PATCH] los datos privados no se indexan --- app/models/metadata_array.rb | 4 +++- app/models/metadata_content.rb | 2 +- app/models/metadata_document_date.rb | 2 +- app/models/metadata_string.rb | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/models/metadata_array.rb b/app/models/metadata_array.rb index 8d951a14..9f5a84b6 100644 --- a/app/models/metadata_array.rb +++ b/app/models/metadata_array.rb @@ -13,8 +13,10 @@ class MetadataArray < MetadataTemplate false end + # Solo los datos públicos se indexan, aunque MetadataArray no se cifra + # aun, dejamos esto preparado para la posteridad. def indexable? - true + true && !private? end def to_s diff --git a/app/models/metadata_content.rb b/app/models/metadata_content.rb index 546e08c8..437a0dd9 100644 --- a/app/models/metadata_content.rb +++ b/app/models/metadata_content.rb @@ -20,7 +20,7 @@ class MetadataContent < MetadataTemplate end def indexable? - true + true && !private? end def to_s diff --git a/app/models/metadata_document_date.rb b/app/models/metadata_document_date.rb index a52cd051..c741e3be 100644 --- a/app/models/metadata_document_date.rb +++ b/app/models/metadata_document_date.rb @@ -12,7 +12,7 @@ class MetadataDocumentDate < MetadataTemplate end def indexable? - true + true && !private? end # El valor puede ser un Date, Time o una String en el formato diff --git a/app/models/metadata_string.rb b/app/models/metadata_string.rb index 724c2ef3..95aac4d4 100644 --- a/app/models/metadata_string.rb +++ b/app/models/metadata_string.rb @@ -8,7 +8,7 @@ class MetadataString < MetadataTemplate end def indexable? - true + true && !private? end private