diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-03 15:43:59 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-03 15:43:59 -0700 |
commit | e59f3809efd8905183056c0a965b93df52a6f62e (patch) | |
tree | 40398a91874dab8027482c5bed24f16e280232e7 /activerecord/test/models/post.rb | |
parent | 2c22376fe04b89e8f34620139720b85a85ce3428 (diff) | |
parent | 453c7d6c47be01c9938af14962279e4cb2d6e506 (diff) | |
download | rails-e59f3809efd8905183056c0a965b93df52a6f62e.tar.gz rails-e59f3809efd8905183056c0a965b93df52a6f62e.tar.bz2 rails-e59f3809efd8905183056c0a965b93df52a6f62e.zip |
Merge pull request #7792 from seejee/chained_scopes_preload_properly
Fixes Issue #7490: Chained scopes will preload properly
Diffstat (limited to 'activerecord/test/models/post.rb')
-rw-r--r-- | activerecord/test/models/post.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb index 9aa02fa18f..3cfd1a0f76 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -76,6 +76,9 @@ class Post < ActiveRecord::Base end end + scope :with_comments, preload(:comments) + scope :with_tags, preload(:taggings) + has_many :interpolated_taggings, :class_name => 'Tagging', :as => :taggable, :conditions => proc { "1 = #{1}" } has_many :interpolated_tags, :through => :taggings has_many :interpolated_tags_2, :through => :interpolated_taggings, :source => :tag |