diff options
Diffstat (limited to 'activerecord/test/models/post.rb')
-rw-r--r-- | activerecord/test/models/post.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb index 73ffc0de38..93a7a2073c 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -178,6 +178,11 @@ class PostWithDefaultInclude < ActiveRecord::Base has_many :comments, :foreign_key => :post_id end +class PostWithSpecialCategorization < Post + has_many :categorizations, :foreign_key => :post_id + default_scope { where(:type => 'PostWithSpecialCategorization').joins(:categorizations).where(:categorizations => { :special => true }) } +end + class PostWithDefaultScope < ActiveRecord::Base self.table_name = 'posts' default_scope { order(:title) } |