5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 02:01:42 +00:00

redirigir a la lista con idioma

This commit is contained in:
f 2021-05-10 15:18:04 -03:00
parent cf01fb700c
commit 9d91323f49
2 changed files with 8 additions and 8 deletions

View file

@ -120,7 +120,7 @@ class PostsController < ApplicationController
# TODO: Notificar si se pudo o no
service.destroy
site.touch
redirect_to site_posts_path(site)
redirect_to site_posts_path(site, locale: post.locale.value)
end
# Reordenar los artículos
@ -133,7 +133,7 @@ class PostsController < ApplicationController
service.reorder
site.touch
redirect_to site_posts_path(site)
redirect_to site_posts_path(site, locale: site.default_locale)
end
# Devuelve el idioma solicitado a través de un parámetro, validando

View file

@ -23,7 +23,7 @@ class SitesController < ApplicationController
def show
authorize site
redirect_to site_posts_path(site)
redirect_to site_posts_path(site, locale: site.default_locale)
end
def new
@ -40,7 +40,7 @@ class SitesController < ApplicationController
params: site_params)
if (@site = service.create).persisted?
redirect_to site_posts_path(@site)
redirect_to site_posts_path(@site, locale: @site.default_locale)
else
render 'new'
end
@ -49,7 +49,7 @@ class SitesController < ApplicationController
def edit
authorize site
breadcrumb site.title, site_posts_path(site), match: :exact
breadcrumb site.title, site_posts_path(site, locale: site.default_locale), match: :exact
breadcrumb 'sites.edit', site_path(site)
SiteService.new(site: site).build_deploys
@ -62,7 +62,7 @@ class SitesController < ApplicationController
usuarie: current_usuarie)
if service.update.valid?
redirect_to site_posts_path(site)
redirect_to site_posts_path(site, locale: site.default_locale)
else
render 'edit'
end
@ -74,7 +74,7 @@ class SitesController < ApplicationController
# XXX: Convertir en una máquina de estados?
DeployJob.perform_async site.id if site.enqueue!
redirect_to site_posts_path(site)
redirect_to site_posts_path(site, locale: site.default_locale)
end
def reorder_posts
@ -94,7 +94,7 @@ class SitesController < ApplicationController
flash[:danger] = I18n.t('errors.posts.reorder')
end
redirect_to site_posts_path(site)
redirect_to site_posts_path(site, locale: site.default_locale)
end
def fetch