1 class Comment
< ActiveRecord
::Base
2 named_scope
:containing_the_letter_e, :conditions => "comments.body LIKE '%e%'"
4 belongs_to
:post, :counter_cache => true
10 def self.search_by_type(q
)
11 self.find(:all, :conditions => ["#{QUOTED_TYPE} = ?", q
])
15 class SpecialComment
< Comment
17 'a special comment...'
21 class VerySpecialComment
< Comment
23 'a very special comment...'