Froze rails gems
[depot.git] / vendor / rails / activerecord / test / models / comment.rb
1 class Comment < ActiveRecord::Base
2 named_scope :containing_the_letter_e, :conditions => "comments.body LIKE '%e%'"
3
4 belongs_to :post, :counter_cache => true
5
6 def self.what_are_you
7 'a comment...'
8 end
9
10 def self.search_by_type(q)
11 self.find(:all, :conditions => ["#{QUOTED_TYPE} = ?", q])
12 end
13 end
14
15 class SpecialComment < Comment
16 def self.what_are_you
17 'a special comment...'
18 end
19 end
20
21 class VerySpecialComment < Comment
22 def self.what_are_you
23 'a very special comment...'
24 end
25 end