aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-03-28 16:13:57 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-03-28 16:13:57 +0000
commitbdd88810c1edf8289801f88170eb5c9659b2f774 (patch)
tree5db49fa022d20885310a4e86bcac0496f601396e /activerecord/test/models
parent533da24bbce5c6eeb23ff372fa0b65911fc138d0 (diff)
downloadrails-bdd88810c1edf8289801f88170eb5c9659b2f774.tar.gz
rails-bdd88810c1edf8289801f88170eb5c9659b2f774.tar.bz2
rails-bdd88810c1edf8289801f88170eb5c9659b2f774.zip
Fixed that has_many :through would ignore the hash conditions (closes #11447) [miloops]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/author.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb
index 79a121b4a4..2918139f7f 100644
--- a/activerecord/test/models/author.rb
+++ b/activerecord/test/models/author.rb
@@ -35,6 +35,11 @@ class Author < ActiveRecord::Base
has_many :hello_post_comments, :through => :hello_posts, :source => :comments
has_many :posts_with_no_comments, :class_name => 'Post', :conditions => 'comments.id is null', :include => :comments
+ has_many :hello_posts_with_hash_conditions, :class_name => "Post",
+:conditions => {:body => 'hello'}
+ has_many :hello_post_comments_with_hash_conditions, :through =>
+:hello_posts_with_hash_conditions, :source => :comments
+
has_many :other_posts, :class_name => "Post"
has_many :posts_with_callbacks, :class_name => "Post", :before_add => :log_before_adding,
:after_add => :log_after_adding,