~michaelforrest/use-case-mapper/trunk

« back to all changes in this revision

Viewing changes to vendor/rails/activerecord/test/models/parrot.rb

  • Committer: Richard Lee (Canonical)
  • Date: 2010-10-15 15:17:58 UTC
  • mfrom: (190.1.3 use-case-mapper)
  • Revision ID: richard.lee@canonical.com-20101015151758-wcvmfxrexsongf9d
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
class Parrot < ActiveRecord::Base
2
 
  set_inheritance_column :parrot_sti_class
3
 
  has_and_belongs_to_many :pirates
4
 
  has_and_belongs_to_many :treasures
5
 
  has_many :loots, :as => :looter
6
 
  alias_attribute :title, :name
7
 
 
8
 
  validates_presence_of :name
9
 
end
10
 
 
11
 
class LiveParrot < Parrot
12
 
end
13
 
 
14
 
class DeadParrot < Parrot
15
 
  belongs_to :killer, :class_name => 'Pirate'
16
 
end