Merge branch 'change-licencias' into 'rails'

ignorar los cambios de licencia en idiomas no soportados

See merge request sutty/sutty!65
This commit is contained in:
Maki 2021-10-22 20:55:58 +00:00
commit 05edb296d0

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)