5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 13:41:41 +00:00

ignorar los cambios de licencia en idiomas no soportados

This commit is contained in:
f 2021-10-22 17:13:26 -03:00
parent 8bebe155f4
commit 84e543ac07

View file

@ -122,6 +122,8 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do
# la búsqueda.
def change_licencias
site.locales.each do |locale|
next unless I18n.available_locales.include? locale
Mobility.with_locale(locale) do
permalink = "#{I18n.t('activerecord.models.licencia').downcase}/"
post = site.posts(lang: locale).find_by(permalink: permalink)