aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures/parrot.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-11-26 22:46:11 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-11-26 22:46:11 +0000
commitc7e39691899b080a451a4c94a3632cada5ab0750 (patch)
treea8f4726cb92225a0bf7517ea666e3b644cd1cb1c /activerecord/test/fixtures/parrot.rb
parent8b3f83105ce719642a8f079f72c4f03c97cfc321 (diff)
downloadrails-c7e39691899b080a451a4c94a3632cada5ab0750.tar.gz
rails-c7e39691899b080a451a4c94a3632cada5ab0750.tar.bz2
rails-c7e39691899b080a451a4c94a3632cada5ab0750.zip
Foxy fixtures: support single-table inheritance. Closes #10234.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/parrot.rb')
-rw-r--r--activerecord/test/fixtures/parrot.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/parrot.rb b/activerecord/test/fixtures/parrot.rb
index 10850669e7..65191c1aa5 100644
--- a/activerecord/test/fixtures/parrot.rb
+++ b/activerecord/test/fixtures/parrot.rb
@@ -1,5 +1,13 @@
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
end
+
+class LiveParrot < Parrot
+end
+
+class DeadParrot < Parrot
+ belongs_to :killer, :class_name => 'Pirate'
+end