aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures/post.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-03 08:21:22 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-03 08:21:22 +0000
commitd9d22c7596118051ba8908c163c797b90cca7aa3 (patch)
treee6cab8dca303f6479aac8e1d6fe5fa010df7a5ed /activerecord/test/fixtures/post.rb
parent703d18ea520c3def7bc677cef5fd87e2c7c3cd34 (diff)
downloadrails-d9d22c7596118051ba8908c163c797b90cca7aa3.tar.gz
rails-d9d22c7596118051ba8908c163c797b90cca7aa3.tar.bz2
rails-d9d22c7596118051ba8908c163c797b90cca7aa3.zip
Fixed that single-table inheritance sub-classes couldn't be used to limit the result set with eager loading #1215 [Chris McGrath]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/post.rb')
-rw-r--r--activerecord/test/fixtures/post.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/activerecord/test/fixtures/post.rb b/activerecord/test/fixtures/post.rb
index bac0857e5f..e347d94fb8 100644
--- a/activerecord/test/fixtures/post.rb
+++ b/activerecord/test/fixtures/post.rb
@@ -1,8 +1,14 @@
class Post < ActiveRecord::Base
belongs_to :author
has_many :comments, :order => "body"
+ has_one :very_special_comment, :class_name => "VerySpecialComment"
+ has_many :special_comments, :class_name => "SpecialComment"
has_and_belongs_to_many :categories
+ has_and_belongs_to_many :special_categories, :join_table => "categories_posts"
end
-class SpecialPost < Post
-end \ No newline at end of file
+class SpecialPost < Post; end;
+
+class StiPost < Post
+ has_one :special_comment, :class_name => "SpecialComment"
+end