5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-10-06 16:16:56 +00:00

fix: recuperar el valor

This commit is contained in:
f 2023-03-22 13:55:51 -03:00
parent 88c1ffe4b8
commit ad1d59d6a4

View file

@ -7,13 +7,12 @@
- site.locales.each do |locale| - site.locales.each do |locale|
- next if post.lang.value == locale - next if post.lang.value == locale
- locale_t = t("locales.#{locale}.name") - locale_t = t("locales.#{locale}.name")
- value = metadata.value.find do |v|
- metadata.values[locale].values.include? v
.form-group .form-group
= label_tag "#{base}_#{attribute}_#{locale}", locale_t = label_tag "#{base}_#{attribute}_#{locale}", locale_t
= select_tag("#{plain_field_name_for(base, attribute)}[]", = select_tag("#{plain_field_name_for(base, attribute)}[]",
options_for_select(metadata.values[locale]), options_for_select(metadata.values[locale], value),
**field_options(attribute, metadata), include_blank: t('.empty')) **field_options(attribute, metadata), include_blank: t('.empty'))
= render 'posts/attribute_feedback',
post: post, attribute: attribute, metadata: metadata