Polymorphic controller and calling object
问题 I have a polymorphic relationship with address being able to both be owned by a member or a dependent. Everything looked great until I realized that I wouldn't know what type of object was creating it unless I'm missing something. Is there a way to tell the routing file to include the type of object? Models: class Member < ActiveRecord::Base has_one :address, as: :person, dependent: :destroy end class Dependent < ActiveRecord::Base has_one :address, as: :person, dependent: :destroy end class