I have Comment as a polymorphic model.
It is attached to Post, Review, etc.
I also have an action in CommentsController, called test.
test
I
Something like this: (in your partial view)
@commentable.each |commentable| test_#{commentable.class.to_s.downcase}_comment_path end
if it is 'post' then it will generate 'test_post_comment_path', if it is review, it will generate test_review_comment_path