aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorMatt Jones <al2o3cr@gmail.com>2014-02-21 17:58:40 -0500
committerMatt Jones <al2o3cr@gmail.com>2014-02-21 17:58:40 -0500
commit70a5e5638bfd3b2543bb9d4805cbefec84b6b1ce (patch)
treea0d586612e71950a8dca78b1aa21ea0a0f0cf83f /activerecord/test/models
parent467cb908dd5f40cbfefe41b93e219682a3ced535 (diff)
downloadrails-70a5e5638bfd3b2543bb9d4805cbefec84b6b1ce.tar.gz
rails-70a5e5638bfd3b2543bb9d4805cbefec84b6b1ce.tar.bz2
rails-70a5e5638bfd3b2543bb9d4805cbefec84b6b1ce.zip
Pass a base relation to build_default_scope when joining
This allows the default scope to be built using the current table alias. Resolves #12770
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/category.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/category.rb b/activerecord/test/models/category.rb
index 7da39a8e33..272223e1d8 100644
--- a/activerecord/test/models/category.rb
+++ b/activerecord/test/models/category.rb
@@ -22,6 +22,7 @@ class Category < ActiveRecord::Base
end
has_many :categorizations
+ has_many :special_categorizations
has_many :post_comments, :through => :posts, :source => :comments
has_many :authors, :through => :categorizations