rails/activerecord/test/models/essay.rb
Szymon Nowak 1c11437a32 Add primary_key option to belongs_to association
[#765 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-07-15 18:13:32 -07:00

4 lines
103 B
Ruby

class Essay < ActiveRecord::Base
belongs_to :writer, :primary_key => :name, :polymorphic => true
end