2009-05-01 11:01:13 -04:00
|
|
|
class Man < ActiveRecord::Base
|
|
|
|
has_one :face, :inverse_of => :man
|
2009-11-29 00:46:09 -05:00
|
|
|
has_one :polymorphic_face, :class_name => 'Face', :as => :polymorphic_man, :inverse_of => :polymorphic_man
|
2009-05-01 11:01:13 -04:00
|
|
|
has_many :interests, :inverse_of => :man
|
2009-11-29 00:46:09 -05:00
|
|
|
has_many :polymorphic_interests, :class_name => 'Interest', :as => :polymorphic_man, :inverse_of => :polymorphic_man
|
2009-05-01 11:01:13 -04:00
|
|
|
# These are "broken" inverse_of associations for the purposes of testing
|
|
|
|
has_one :dirty_face, :class_name => 'Face', :inverse_of => :dirty_man
|
|
|
|
has_many :secret_interests, :class_name => 'Interest', :inverse_of => :secret_man
|
|
|
|
end
|