5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 12:51:42 +00:00

fix: siempre devolver una relación #12768

This commit is contained in:
f 2023-03-24 11:50:25 -03:00
parent 59606f3263
commit b51eb6856c

View file

@ -44,6 +44,6 @@ class MetadataLocales < MetadataHasAndBelongsToMany
def posts
other_locales.map do |locale|
site.posts(lang: locale).where(layout: post.layout.value)
end.reduce(&:concat)
end.reduce(&:concat) || PostRelation.new
end
end