开发者

Embed same comment page in RoR?

开发者 https://www.devze.com 2022-12-16 10:45 出处:网络
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

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

精彩评论

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

关注公众号