Sha256: a4b3ba4281f693a772d245b7c72ee5a489f33763460b013a4646da57da47382f

Contents?: true

Size: 411 Bytes

Versions: 2

Compression:

Stored size: 411 Bytes

Contents

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; 

  def self.what_are_you
    'a special comment...'
  end
  
end;

class VerySpecialComment < Comment; 
  
  def self.what_are_you
    'a very special comment...'
  end
  
end;

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-1.12.2 test/fixtures/comment.rb
activerecord-1.12.1 test/fixtures/comment.rb