aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/essay.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2010-10-19 14:14:06 +0100
committerJon Leighton <j@jonathanleighton.com>2010-10-19 14:14:06 +0100
commit01838636c6136d9a649ace71db61bb7990f9bd82 (patch)
tree2f307e4dd6843588ab19f7d41615a04465560fff /activerecord/test/models/essay.rb
parent596cc3b2329a9cc4a30c95c157ce36b2d08975df (diff)
downloadrails-01838636c6136d9a649ace71db61bb7990f9bd82.tar.gz
rails-01838636c6136d9a649ace71db61bb7990f9bd82.tar.bz2
rails-01838636c6136d9a649ace71db61bb7990f9bd82.zip
Support for :primary_key option on the source reflection of a through association, where the source is a has_one or has_many
Diffstat (limited to 'activerecord/test/models/essay.rb')
-rw-r--r--activerecord/test/models/essay.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/models/essay.rb b/activerecord/test/models/essay.rb
index 6a62042863..ec4b982b5b 100644
--- a/activerecord/test/models/essay.rb
+++ b/activerecord/test/models/essay.rb
@@ -1,4 +1,5 @@
class Essay < ActiveRecord::Base
belongs_to :writer, :primary_key => :name, :polymorphic => true
- belongs_to :category
+ belongs_to :category, :primary_key => :name
+ has_one :owner, :primary_key => :name
end