1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--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

3 lines
103 B
Ruby

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