Rails polymorphic的使用和理解
class Person < ActiveRecord::Base has_one :address, :as => :addressableendclass Company < ActiveRecord::Base has_one :address, :as => :addressableendclass Address < ActiveRecord::Base belongs_to :addressable, :polymorphic => trueend