aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/essay.rb
blob: 1f9772870ef7d6e52cd8800fe22fdf08a1a7b7ff (plain) (blame)
1
2
3
4
5
6
class Essay < ActiveRecord::Base
  belongs_to :author
  belongs_to :writer, primary_key: :name, polymorphic: true
  belongs_to :category, primary_key: :name
  has_one :owner, primary_key: :name
end