From a149c870e2023f0b0f41957efebc114b0e50925c Mon Sep 17 00:00:00 2001 From: f Date: Thu, 6 May 2021 13:00:05 -0300 Subject: [PATCH] =?UTF-8?q?las=20categor=C3=ADas=20se=20guardan=20en=20ind?= =?UTF-8?q?exed=20posts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit algunas categorías son otros artículos relacionados, con este método garantizamos que sólo se guardan los títulos. --- app/models/metadata_array.rb | 2 ++ app/models/metadata_related_posts.rb | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/app/models/metadata_array.rb b/app/models/metadata_array.rb index 5f43b790..8d951a14 100644 --- a/app/models/metadata_array.rb +++ b/app/models/metadata_array.rb @@ -21,6 +21,8 @@ class MetadataArray < MetadataTemplate value.join(', ') end + alias indexable_values values + private # TODO: Sanitizar otros valores diff --git a/app/models/metadata_related_posts.rb b/app/models/metadata_related_posts.rb index bcc18d86..4c022fff 100644 --- a/app/models/metadata_related_posts.rb +++ b/app/models/metadata_related_posts.rb @@ -22,6 +22,10 @@ class MetadataRelatedPosts < MetadataArray false end + def indexable_values + values.keys + end + private # Obtiene todos los posts y opcionalmente los filtra