instiki/vendor/rails/activerecord/test/models/parrot.rb
Jacques Distler 7600aef48b Upgrade to Rails 2.2.0
As a side benefit, fix an (non-user-visible) bug in display_s5().
Also fixed a bug where removing orphaned pages did not expire cached summary pages.
2008-10-27 01:47:01 -05:00

15 lines
327 B
Ruby

class Parrot < ActiveRecord::Base
set_inheritance_column :parrot_sti_class
has_and_belongs_to_many :pirates
has_and_belongs_to_many :treasures
has_many :loots, :as => :looter
alias_attribute :title, :name
end
class LiveParrot < Parrot
end
class DeadParrot < Parrot
belongs_to :killer, :class_name => 'Pirate'
end