aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorErnie Miller <ernie@metautonomo.us>2010-05-03 20:47:42 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2010-12-14 16:16:34 -0800
commitc81af00a7ab64ec1159e8b319f8498ea5b9037c7 (patch)
tree94d7c48d117643418c402c4226a97aa942d3e10b /activerecord/test/models
parent00c893d3b86be3a141c21ed065e085adbb26062a (diff)
downloadrails-c81af00a7ab64ec1159e8b319f8498ea5b9037c7.tar.gz
rails-c81af00a7ab64ec1159e8b319f8498ea5b9037c7.tar.bz2
rails-c81af00a7ab64ec1159e8b319f8498ea5b9037c7.zip
Fix hm:t to self table aliasing in construct_scope
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/person.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/person.rb b/activerecord/test/models/person.rb
index 951ec93c53..bee89de042 100644
--- a/activerecord/test/models/person.rb
+++ b/activerecord/test/models/person.rb
@@ -12,6 +12,7 @@ class Person < ActiveRecord::Base
belongs_to :primary_contact, :class_name => 'Person'
has_many :agents, :class_name => 'Person', :foreign_key => 'primary_contact_id'
+ has_many :agents_of_agents, :through => :agents, :source => :agents
belongs_to :number1_fan, :class_name => 'Person'
scope :males, :conditions => { :gender => 'M' }