mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 19:43:38 +00:00
Merge branch 'locale' into rails
This commit is contained in:
commit
55e0466102
3 changed files with 3 additions and 3 deletions
|
@ -89,7 +89,7 @@
|
||||||
|
|
||||||
%div
|
%div
|
||||||
%tbody
|
%tbody
|
||||||
- dir = t("locales.#{@locale}.dir")
|
- dir = @site.data.dig(params[:locale], 'dir')
|
||||||
- size = @posts.size
|
- size = @posts.size
|
||||||
- @posts.each_with_index do |post, i|
|
- @posts.each_with_index do |post, i|
|
||||||
-#
|
-#
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- dir = t("locales.#{@locale}.dir")
|
- dir = @site.data.dig(params[:locale], 'dir')
|
||||||
.row.justify-content-center
|
.row.justify-content-center
|
||||||
.col-md-8
|
.col-md-8
|
||||||
%article.content.table-responsive-md
|
%article.content.table-responsive-md
|
||||||
|
|
|
@ -55,7 +55,7 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
# Gestionar artículos según idioma
|
# Gestionar artículos según idioma
|
||||||
nested do
|
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'
|
post :'posts/reorder', to: 'posts#reorder'
|
||||||
resources :posts do
|
resources :posts do
|
||||||
get 'p/:page', action: :index, on: :collection
|
get 'p/:page', action: :index, on: :collection
|
||||||
|
|
Loading…
Reference in a new issue