| Class | Comment |
| In: |
app/models/comment.rb
|
| Parent: | ActiveRecord::Base |
# File app/models/comment.rb, line 27
27: def ordered_active(item_id = nil)
28: conditions = { :order => "created_at DESC", :conditions => { :active => true } }
29: if item_id
30: find_all_by_item_id(item_id, conditions)
31: else
32: all(conditions)
33: end
34: end
# File app/models/comment.rb, line 23
23: def page_find(page = 1)
24: paginate(:page => page, :order => "comments.created_at desc")
25: end