5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-07 09:05:45 +00:00

los valores de los sub atributos tambien son unicos #51

This commit is contained in:
f 2018-06-26 20:44:23 -03:00
parent e1d7abd254
commit 55f5797a54
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -268,6 +268,7 @@ class Post
post.site.everything_of(attr, lang: collection)
.compact
.map { |sv| sv[subattr] }
.flatten
.uniq
else
post.site.everything_of(attr, lang: collection).compact
@ -290,8 +291,6 @@ class Post
end
end
binding.pry if _value.last.nil?
# Crea un array de arrays, útil para los select
# [ [ 1, a ], [ 2, b ] ]
# aunque si no hay un : en el autocompletado, el array queda