instiki/vendor/rails/activerecord/test/models/parrot.rb
Jacques Distler 4e14ccc74d Instiki 0.16.3: Rails 2.3.0
Instiki now runs on the Rails 2.3.0 Candidate Release.
Among other improvements, this means that it now 
automagically selects between WEBrick and Mongrel.

Just run

    ./instiki --daemon
2009-02-04 14:26:08 -06:00

17 lines
358 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
validates_presence_of :name
end
class LiveParrot < Parrot
end
class DeadParrot < Parrot
belongs_to :killer, :class_name => 'Pirate'
end