diff options
| author | hukl <hukl@eight.local> | 2009-02-07 15:50:40 +0100 |
|---|---|---|
| committer | hukl <hukl@eight.local> | 2009-02-07 15:50:40 +0100 |
| commit | 36a2f1f3c085dd81171cf7d8220770d4ff921ab3 (patch) | |
| tree | 5ded15331b192bf428af4c94d46d1abb28ef0690 /app/models | |
| parent | ce9645d0092d42c7bf8781378181ffbd4ff3d088 (diff) | |
added globalize2 plugin as well as some modifications
which use the new translation facilities.
backend mostly.
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/page.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/models/page.rb b/app/models/page.rb index 4fcee8c..df8308b 100644 --- a/app/models/page.rb +++ b/app/models/page.rb | |||
| @@ -1,10 +1,16 @@ | |||
| 1 | class Page < ActiveRecord::Base | 1 | class Page < ActiveRecord::Base |
| 2 | 2 | ||
| 3 | belongs_to :node | 3 | # Mixins and Plugins |
| 4 | |||
| 5 | acts_as_taggable | 4 | acts_as_taggable |
| 6 | acts_as_list :column => :revision, :scope => :node_id | 5 | acts_as_list :column => :revision, :scope => :node_id |
| 7 | 6 | ||
| 7 | translates :title, :abstract, :body # Globalize2 | ||
| 8 | |||
| 9 | # Associations | ||
| 10 | belongs_to :node | ||
| 11 | |||
| 12 | # Class Methods | ||
| 13 | |||
| 8 | # This method is most likely called from the ContentHelper.render_collection | 14 | # This method is most likely called from the ContentHelper.render_collection |
| 9 | # method which aggregates pages into a collection, based on parameters it | 15 | # method which aggregates pages into a collection, based on parameters it |
| 10 | # recieves. This method then calls Page.aggregate with these parameters. | 16 | # recieves. This method then calls Page.aggregate with these parameters. |
| @@ -27,4 +33,6 @@ class Page < ActiveRecord::Base | |||
| 27 | :match_all => true, | 33 | :match_all => true, |
| 28 | :order => "#{options[:order_by]} #{options[:order_direction]}") | 34 | :order => "#{options[:order_by]} #{options[:order_direction]}") |
| 29 | end | 35 | end |
| 36 | |||
| 37 | # Instance Methods | ||
| 30 | end \ No newline at end of file | 38 | end \ No newline at end of file |
