aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorsiddharth@vinsol.com <siddharth@vinsol.com>2014-11-20 01:35:04 +0530
committersiddharth@vinsol.com <siddharth@vinsol.com>2014-11-21 21:13:11 +0530
commit91e3dab804fffe0b1daebb438091418faa1fa256 (patch)
tree9ac7acc6a00c82e787cb010d15d9c9be666fa667 /activerecord/test/models
parent7e375afba30951b60a3e606ccbfe3f28b0df5e1a (diff)
downloadrails-91e3dab804fffe0b1daebb438091418faa1fa256.tar.gz
rails-91e3dab804fffe0b1daebb438091418faa1fa256.tar.bz2
rails-91e3dab804fffe0b1daebb438091418faa1fa256.zip
Fix includes on association with a scope containing joins along with conditions
on the joined assoiciation
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/post.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb
index 36cf221d45..a9996e5236 100644
--- a/activerecord/test/models/post.rb
+++ b/activerecord/test/models/post.rb
@@ -78,6 +78,7 @@ class Post < ActiveRecord::Base
has_one :very_special_comment
has_one :very_special_comment_with_post, -> { includes(:post) }, :class_name => "VerySpecialComment"
+ has_one :very_special_comment_with_post_with_joins, -> { joins(:post).order('posts.id') }, class_name: "VerySpecialComment"
has_many :special_comments
has_many :nonexistant_comments, -> { where 'comments.id < 0' }, :class_name => 'Comment'