开发者

Embed same comment page in RoR?

I have a div id called common, the content that I would like to appear in this div is in the file share/_common.html.erb

What should I put in place of <!-- content from _common.html.erb --> so that the 开发者_运维问答contents of share/_common.html.erb appears in the div?

<div id="common">
<!-- content from _common.html.erb -->
</div>


Replace your HTML comment with this:

<%= render :partial => "share/common" %>

or, if you're on Rails 2.3.x:

<%= render "share/common" %>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜