From 6c20570d2a4c6cb698d0a08dbcb86ecc2a25a131 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 27 Jul 2026 11:16:14 +0200 Subject: Pin admin content reads to the default locale --- app/controllers/nodes_controller.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'app/controllers/nodes_controller.rb') diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index 2a2cde33..4ac3d99a 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb @@ -1,4 +1,5 @@ class NodesController < ApplicationController + include PinnedToDefaultLocale # Private @@ -18,8 +19,6 @@ class NodesController < ApplicationController :restore_from_trash ] - around_action :pin_to_default_locale, :only => [:show, :edit, :update, :autosave] - def index @nodes = Node.root.descendants.includes(:head, :draft) .order('id DESC') @@ -295,10 +294,6 @@ class NodesController < ApplicationController end end - def pin_to_default_locale - Globalize.with_locale(I18n.default_locale) { yield } - end - def descendant_counts_for(ordered_with_level) counts = Hash.new(0) stack = [] # [node, level, index] -- cgit v1.3