diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2014-11-24 14:55:34 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2014-11-24 14:55:34 -0200 |
commit | e3acd74fa8cbe5c09321ee75dd387e9d8cb044fc (patch) | |
tree | 03b48edff010244ca9f7f54588a1cd8ffdfe23f7 /activerecord/test/models/post.rb | |
parent | 33c80cb69e183abb1212de0851565ef7f1c48cc4 (diff) | |
parent | 91e3dab804fffe0b1daebb438091418faa1fa256 (diff) | |
download | rails-e3acd74fa8cbe5c09321ee75dd387e9d8cb044fc.tar.gz rails-e3acd74fa8cbe5c09321ee75dd387e9d8cb044fc.tar.bz2 rails-e3acd74fa8cbe5c09321ee75dd387e9d8cb044fc.zip |
Merge pull request #17678 from siddharth28/includes_with_scope_with_joins
Fix includes on association with a scope
Diffstat (limited to 'activerecord/test/models/post.rb')
-rw-r--r-- | activerecord/test/models/post.rb | 1 |
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' |