$("#<%= Comment.wrapid_for(@commentable) %>").html("<%= escape_javascript "" %>") $("#<%= Comment.switchshowid_for(@commentable) %>").replaceWith("<%= escape_javascript link_to "Comments...", comments_path(commentable_type: @commentable.class.to_s.gsub("::","_"), commentable_id: @commentable.id), remote: true, id: Comment.switchshowid_for( @commentable) %>")