Rails polymorphic link for nested index action
问题 I have been trying to find this one link for hours now. I have a polymorphic association where both collections & assortments have designs. Collection model has_many :designs, :as => :targetable Assortment model has_many :designs, :as => :targetable Design model belongs_to :targetable, :polymorphic => true In order to link to the design's 'show' action, the proper polymorphic path would be: link_to polymorphic_path([@targetable, @design]) But I can't figure out how to link to the design's