summaryrefslogtreecommitdiff
path: root/app/models/page.rb
diff options
context:
space:
mode:
authorhukl <hukl@eight.local>2009-02-06 21:48:41 +0100
committerhukl <hukl@eight.local>2009-02-07 12:25:31 +0100
commitce9645d0092d42c7bf8781378181ffbd4ff3d088 (patch)
treee569a73ac2db2b36b2e90835260c46bcf0d479fa /app/models/page.rb
parent79002c688d4fe6bf058459af84986a0d70dde758 (diff)
added head id to node model which points to the
head of the nodes pages collection. modified tests, importer etc renamed flags to tags
Diffstat (limited to 'app/models/page.rb')
-rw-r--r--app/models/page.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/page.rb b/app/models/page.rb
index d33e11b..4fcee8c 100644
--- a/app/models/page.rb
+++ b/app/models/page.rb
@@ -14,7 +14,7 @@ class Page < ActiveRecord::Base
14 def self.aggregate options 14 def self.aggregate options
15 15
16 defaults = { 16 defaults = {
17 :flags => "", 17 :tags => "",
18 :limit => 20, 18 :limit => 20,
19 :order_by => "id", 19 :order_by => "id",
20 :order_direction => "ASC" 20 :order_direction => "ASC"
@@ -23,7 +23,7 @@ class Page < ActiveRecord::Base
23 options = defaults.merge options 23 options = defaults.merge options
24 24
25 pages = Page.find_tagged_with( 25 pages = Page.find_tagged_with(
26 options[:flags].gsub(/\s/, ", "), 26 options[:tags].gsub(/\s/, ", "),
27 :match_all => true, 27 :match_all => true,
28 :order => "#{options[:order_by]} #{options[:order_direction]}") 28 :order => "#{options[:order_by]} #{options[:order_direction]}")
29 end 29 end