mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 23:36:21 +00:00
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:
commit
05edb296d0
1 changed files with 2 additions and 0 deletions
|
@ -122,6 +122,8 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do
|
||||||
# la búsqueda.
|
# la búsqueda.
|
||||||
def change_licencias
|
def change_licencias
|
||||||
site.locales.each do |locale|
|
site.locales.each do |locale|
|
||||||
|
next unless I18n.available_locales.include? locale
|
||||||
|
|
||||||
Mobility.with_locale(locale) do
|
Mobility.with_locale(locale) do
|
||||||
permalink = "#{I18n.t('activerecord.models.licencia').downcase}/"
|
permalink = "#{I18n.t('activerecord.models.licencia').downcase}/"
|
||||||
post = site.posts(lang: locale).find_by(permalink: permalink)
|
post = site.posts(lang: locale).find_by(permalink: permalink)
|
||||||
|
|
Loading…
Reference in a new issue