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

Merge branch 'locale' into rails

This commit is contained in:
f 2023-03-23 19:23:27 -03:00
commit 55e0466102
3 changed files with 3 additions and 3 deletions

View file

@ -89,7 +89,7 @@
%div
%tbody
- dir = t("locales.#{@locale}.dir")
- dir = @site.data.dig(params[:locale], 'dir')
- size = @posts.size
- @posts.each_with_index do |post, i|
-#

View file

@ -1,4 +1,4 @@
- dir = t("locales.#{@locale}.dir")
- dir = @site.data.dig(params[:locale], 'dir')
.row.justify-content-center
.col-md-8
%article.content.table-responsive-md

View file

@ -55,7 +55,7 @@ Rails.application.routes.draw do
# Gestionar artículos según idioma
nested do
scope '/(:locale)', constraint: /[a-z]{2}/ do
scope '/(:locale)', constraint: /[a-z]{2}(-[A-Z]{2})?/ do
post :'posts/reorder', to: 'posts#reorder'
resources :posts do
get 'p/:page', action: :index, on: :collection