aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/person.rb
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2008-04-25 23:23:48 +0100
committerMichael Koziarski <michael@koziarski.com>2008-04-26 12:14:50 +1200
commit44d214235271cb6d2af1c327d592a3010e1ced3e (patch)
tree5db346cc10ff1dab291e62545a2480a819271f74 /activerecord/test/models/person.rb
parenta37546517dad9f6d9a7de6e1dba4d960909d71e8 (diff)
downloadrails-44d214235271cb6d2af1c327d592a3010e1ced3e.tar.gz
rails-44d214235271cb6d2af1c327d592a3010e1ced3e.tar.bz2
rails-44d214235271cb6d2af1c327d592a3010e1ced3e.zip
Ensure table names are quoted by the association preloading code.
[#45 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activerecord/test/models/person.rb')
-rw-r--r--activerecord/test/models/person.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/models/person.rb b/activerecord/test/models/person.rb
index 366f9fb708..4f4d695b24 100644
--- a/activerecord/test/models/person.rb
+++ b/activerecord/test/models/person.rb
@@ -2,4 +2,9 @@ class Person < ActiveRecord::Base
has_many :readers
has_many :posts, :through => :readers
has_many :posts_with_no_comments, :through => :readers, :source => :post, :include => :comments, :conditions => 'comments.id is null'
+
+ has_many :references
+ has_many :jobs, :through => :references
+ has_one :favourite_reference, :class_name => 'Reference', :conditions => ['favourite=?', true]
+
end