diff options
Diffstat (limited to 'app/controllers/nodes_controller.rb')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index 95aed48..7c082c4 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -15,12 +15,9 @@ class NodesController < ApplicationController | |||
| 15 | ] | 15 | ] |
| 16 | 16 | ||
| 17 | def index | 17 | def index |
| 18 | @nodes = Node.root.descendants.paginate( | 18 | @nodes = Node.root.descendants.includes(:head, :draft) |
| 19 | :include => [:head, :draft], | 19 | .order('id DESC') |
| 20 | :page => params[:page], | 20 | .paginate(:page => params[:page], :per_page => 25) |
| 21 | :per_page => 25, | ||
| 22 | :order => 'id DESC' | ||
| 23 | ) | ||
| 24 | end | 21 | end |
| 25 | 22 | ||
| 26 | def new | 23 | def new |
