diff options
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index 772bf4b..c1468be 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -185,16 +185,11 @@ class NodesController < ApplicationController | |||
| 185 | 185 | ||
| 186 | # Filter functions for admin views | 186 | # Filter functions for admin views |
| 187 | def drafts | 187 | def drafts |
| 188 | base = Node.where("draft_id IS NOT NULL OR autosave_id IS NOT NULL") | 188 | @nodes = index_matching(Node.drafts_and_autosaves) |
| 189 | @nodes = index_matching(base) | ||
| 190 | end | 189 | end |
| 191 | 190 | ||
| 192 | def recent | 191 | def recent |
| 193 | base = Node.where( | 192 | @nodes = index_matching(Node.recently_changed) |
| 194 | "nodes.updated_at < ? AND nodes.updated_at > ? AND nodes.parent_id IS NOT NULL", | ||
| 195 | Time.now, Time.now - 14.days | ||
| 196 | ) | ||
| 197 | @nodes = index_matching(base) | ||
| 198 | end | 193 | end |
| 199 | 194 | ||
| 200 | def mine | 195 | def mine |
