From a36e0e6964fe8089aa91ae09e274ca335d919fa6 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 14 Oct 2024 17:32:04 -0300 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20guardar=20valores=20=C3=BAnicos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/metadata_has_many.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/metadata_has_many.rb b/app/models/metadata_has_many.rb index 13f0dcf5..b4db4454 100644 --- a/app/models/metadata_has_many.rb +++ b/app/models/metadata_has_many.rb @@ -36,6 +36,8 @@ class MetadataHasMany < MetadataRelatedPosts def save super + self[:value] = self[:value].uniq + return true unless changed? return true unless inverse? From e1ac21674ba7d1e5e9012eb007d70f7a773e4c04 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 14 Oct 2024 17:32:28 -0300 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20no=20enviar=20valores=20vac=C3=ADos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #17598 --- app/views/posts/attributes/_new_belongs_to.haml | 1 - app/views/posts/attributes/_new_has_many.haml | 1 - 2 files changed, 2 deletions(-) diff --git a/app/views/posts/attributes/_new_belongs_to.haml b/app/views/posts/attributes/_new_belongs_to.haml index 8cbe3ce0..7f9a66dd 100644 --- a/app/views/posts/attributes/_new_belongs_to.haml +++ b/app/views/posts/attributes/_new_belongs_to.haml @@ -26,7 +26,6 @@ %span.placeholder.w-100 .form-group - = hidden_field_tag name, '' .d-flex.align-items-center.justify-content-between %div = label_tag id, post_label_t(attribute, post: post), class: 'mb-0' diff --git a/app/views/posts/attributes/_new_has_many.haml b/app/views/posts/attributes/_new_has_many.haml index 3869591b..ff657359 100644 --- a/app/views/posts/attributes/_new_has_many.haml +++ b/app/views/posts/attributes/_new_has_many.haml @@ -26,7 +26,6 @@ %span.placeholder.w-100 .form-group - = hidden_field_tag name, '' .d-flex.align-items-center.justify-content-between %div = label_tag id, post_label_t(attribute, post: post), class: 'h3'