aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authormattbauer <bauer@mmmultiworks.com>2009-06-21 17:35:04 +0100
committerPratik Naik <pratiknaik@gmail.com>2009-06-21 17:35:04 +0100
commit83c1934003740ed01c618a8943457a0df53e2adb (patch)
tree7822f0bbe20603cc9563e4e59a6a4ba0f5cd71db /activerecord/test/models
parent9cb8c812f2a23ab5653a7888740a014a02c97c18 (diff)
downloadrails-83c1934003740ed01c618a8943457a0df53e2adb.tar.gz
rails-83c1934003740ed01c618a8943457a0df53e2adb.tar.bz2
rails-83c1934003740ed01c618a8943457a0df53e2adb.zip
Ensure hm:t#create respects source associations hash conditions [#2090 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/post.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb
index 374e536a5b..7392515ec7 100644
--- a/activerecord/test/models/post.rb
+++ b/activerecord/test/models/post.rb
@@ -69,6 +69,8 @@ class Post < ActiveRecord::Base
:after_add => lambda {|owner, reader| log(:added, :after, reader.first_name) },
:before_remove => lambda {|owner, reader| log(:removed, :before, reader.first_name) },
:after_remove => lambda {|owner, reader| log(:removed, :after, reader.first_name) }
+ has_many :skimmers, :class_name => 'Reader', :conditions => { :skimmer => true }
+ has_many :impatient_people, :through => :skimmers, :source => :person
def self.top(limit)
ranked_by_comments.limit(limit)