开发者

Is it possible to rewrite this with proper termination?

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>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜