diff options
Diffstat (limited to 'activerecord/test/fixtures/comment.rb')
-rw-r--r-- | activerecord/test/fixtures/comment.rb | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/activerecord/test/fixtures/comment.rb b/activerecord/test/fixtures/comment.rb index 982cbc6a7a..0605fd7046 100644 --- a/activerecord/test/fixtures/comment.rb +++ b/activerecord/test/fixtures/comment.rb @@ -1,7 +1,27 @@ class Comment < ActiveRecord::Base belongs_to :post + + def self.what_are_you + 'a comment...' + end + + def self.search_by_type(q) + self.find(:all, :conditions => ['type = ?', q]) + end end -class SpecialComment < Comment; end; +class SpecialComment < Comment; -class VerySpecialComment < Comment; end; + def self.what_are_you + 'a special comment...' + end + +end; + +class VerySpecialComment < Comment; + + def self.what_are_you + 'a very special comment...' + end + +end; |