From 25efe4d51d166d676100f4a29628d799a97b61b1 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 May 2024 18:34:28 -0300 Subject: [PATCH] fix: dry --- app/views/posts/attribute_ro/_new_predefined_value.haml | 2 +- app/views/posts/attribute_ro/_predefined_value.haml | 2 +- app/views/posts/attributes/_new_predefined_value.haml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/posts/attribute_ro/_new_predefined_value.haml b/app/views/posts/attribute_ro/_new_predefined_value.haml index fd594975..d44eef69 100644 --- a/app/views/posts/attribute_ro/_new_predefined_value.haml +++ b/app/views/posts/attribute_ro/_new_predefined_value.haml @@ -1,3 +1,3 @@ %tr{ id: attribute } %th= post_label_t(attribute, post: post) - %td{ dir: dir, lang: locale }= metadata.values.invert[metadata.value] + %td{ dir: dir, lang: locale }= metadata.to_s diff --git a/app/views/posts/attribute_ro/_predefined_value.haml b/app/views/posts/attribute_ro/_predefined_value.haml index fd594975..d44eef69 100644 --- a/app/views/posts/attribute_ro/_predefined_value.haml +++ b/app/views/posts/attribute_ro/_predefined_value.haml @@ -1,3 +1,3 @@ %tr{ id: attribute } %th= post_label_t(attribute, post: post) - %td{ dir: dir, lang: locale }= metadata.values.invert[metadata.value] + %td{ dir: dir, lang: locale }= metadata.to_s diff --git a/app/views/posts/attributes/_new_predefined_value.haml b/app/views/posts/attributes/_new_predefined_value.haml index 9975cd11..42e309c3 100644 --- a/app/views/posts/attributes/_new_predefined_value.haml +++ b/app/views/posts/attributes/_new_predefined_value.haml @@ -42,7 +42,7 @@ o activamos los ítemes según estén incluidos en esa lista o no. .row.row-cols-3.row-cols-md-4.no-gutters.placeholder-glow{ data: { target: 'array.current' } } - unless metadata.empty? - = render 'posts/new_array_value', metadata.values[metadata.value] + = render 'posts/new_array_value', value: metadata.to_s = render 'bootstrap/modal', id: id, modal_content_attributes: { class: 'h-100' }, hide_actions: ['array#cancel'] do - content_for :"#{id}_header" do