I can't seem to figure out how to properly terminate these statements..
.append("<div class='grid_2'>#{@new_topic.name}</div><div class='grid_3'><a href=\'#{destroy_topic_admin_me_categories_path(:topic => @开发者_如何学Cnew_topic.id, :class => 'button delete_topic')}\'</div>")
Right now its not closing the last div and anchor tag properly.
This should do the trick
.append("<div class='grid_2'>#{@new_topic.name}</div><div class='grid_3'><a href=\"#{destroy_topic_admin_me_categories_path(:topic => @new_topic.id, :class => 'button delete_topic')}\"></a></div>")
You were missing a > and the using \" is more clear then mixing ' \' with " in my option.
You are missing the rest of the <a href="" />
tag.
You open it with <a href=....
but never complete the tag with >text</a>
精彩评论