diff options
Diffstat (limited to 'app/controllers/nodes_controller.rb')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 7 |
1 files changed, 1 insertions, 6 deletions
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 @@ | |||
| 1 | class NodesController < ApplicationController | 1 | class NodesController < ApplicationController |
| 2 | include PinnedToDefaultLocale | ||
| 2 | 3 | ||
| 3 | # Private | 4 | # Private |
| 4 | 5 | ||
| @@ -18,8 +19,6 @@ class NodesController < ApplicationController | |||
| 18 | :restore_from_trash | 19 | :restore_from_trash |
| 19 | ] | 20 | ] |
| 20 | 21 | ||
| 21 | around_action :pin_to_default_locale, :only => [:show, :edit, :update, :autosave] | ||
| 22 | |||
| 23 | def index | 22 | def index |
| 24 | @nodes = Node.root.descendants.includes(:head, :draft) | 23 | @nodes = Node.root.descendants.includes(:head, :draft) |
| 25 | .order('id DESC') | 24 | .order('id DESC') |
| @@ -295,10 +294,6 @@ class NodesController < ApplicationController | |||
| 295 | end | 294 | end |
| 296 | end | 295 | end |
| 297 | 296 | ||
| 298 | def pin_to_default_locale | ||
| 299 | Globalize.with_locale(I18n.default_locale) { yield } | ||
| 300 | end | ||
| 301 | |||
| 302 | def descendant_counts_for(ordered_with_level) | 297 | def descendant_counts_for(ordered_with_level) |
| 303 | counts = Hash.new(0) | 298 | counts = Hash.new(0) |
| 304 | stack = [] # [node, level, index] | 299 | stack = [] # [node, level, index] |
