To edit pages or tickets please login with username/password: aaf/aaf

root/trunk/demo/app/models/content.rb

Revision 223, 270 bytes (checked in by jk, 1 year ago)

major overhaul of demo project: moved to edge rails, restful controllers, will_paginate for pagination of both content list and search results

Line 
1 class Content < ContentBase #ActiveRecord::Base
2
3   def self.per_page; 10; end
4
5   has_many :comments
6
7   # returns the number of comments attached to this content.
8   # the value returned by this method will be indexed, too.
9   def comment_count
10     comments.size
11   end
12 end
Note: See TracBrowser for help on using the browser.

To edit pages or tickets please login with username/password: aaf/aaf