Sha256: 82397163b4b97348ed3473b9bd3646b51b6a499d996b447e8b08232f7dd3dbe6

Contents?: true

Size: 394 Bytes

Versions: 1

Compression:

Stored size: 394 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

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-1.13.0 test/fixtures/comment.rb