diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-12-12 17:03:41 +0000 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2010-12-16 01:49:30 +0530 |
commit | 491ce5b6ce1a3af42d02efff9a2e42b1a8980553 (patch) | |
tree | f6426bd1640273d10ee2bd8ce6db177c00da97bc /activerecord/test/models/author.rb | |
parent | eba76640862d071d89c846f8624d1e651d872794 (diff) | |
download | rails-491ce5b6ce1a3af42d02efff9a2e42b1a8980553.tar.gz rails-491ce5b6ce1a3af42d02efff9a2e42b1a8980553.tar.bz2 rails-491ce5b6ce1a3af42d02efff9a2e42b1a8980553.zip |
Verify that creating a has_many through record where there is a default_scope on the join model works correctly (creates the join record with the default scope applied)
Diffstat (limited to 'activerecord/test/models/author.rb')
-rw-r--r-- | activerecord/test/models/author.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb index 29ee50e801..fd6d2b384a 100644 --- a/activerecord/test/models/author.rb +++ b/activerecord/test/models/author.rb @@ -77,6 +77,10 @@ class Author < ActiveRecord::Base has_many :categorizations has_many :categories, :through => :categorizations + has_many :special_categorizations + has_many :special_categories, :through => :special_categorizations, :source => :category + has_one :special_category, :through => :special_categorizations, :source => :category + has_many :categories_like_general, :through => :categorizations, :source => :category, :class_name => 'Category', :conditions => { :name => 'General' } has_many :categorized_posts, :through => :categorizations, :source => :post |