diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-19 04:19:53 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-19 04:19:53 +0000 |
commit | 355a8ff2cded22dafaa83c4578d21037eea2ca9c (patch) | |
tree | e07a72bebc7f216827075f3c958ae86d12889bcd /activerecord/test/models | |
parent | abdf546ad6d02ecb95766e73cd3c645a48c954de (diff) | |
download | rails-355a8ff2cded22dafaa83c4578d21037eea2ca9c.tar.gz rails-355a8ff2cded22dafaa83c4578d21037eea2ca9c.tar.bz2 rails-355a8ff2cded22dafaa83c4578d21037eea2ca9c.zip |
Introduce preload query strategy for eager :includes. Closes #9640.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/models')
-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 53dcbb74f3..176a0ddc1e 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -13,6 +13,9 @@ class Post < ActiveRecord::Base end end + has_many :comments_with_interpolated_conditions, :class_name => 'Comment', + :conditions => ['#{"#{aliased_table_name}." rescue ""}body = ?', 'Thank you for the welcome'] + has_one :very_special_comment has_one :very_special_comment_with_post, :class_name => "VerySpecialComment", :include => :post has_many :special_comments |