diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-10-19 14:14:06 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-10-19 14:14:06 +0100 |
commit | 01838636c6136d9a649ace71db61bb7990f9bd82 (patch) | |
tree | 2f307e4dd6843588ab19f7d41615a04465560fff /activerecord/test/models/essay.rb | |
parent | 596cc3b2329a9cc4a30c95c157ce36b2d08975df (diff) | |
download | rails-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.rb | 3 |
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 |