加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 为什么嵌入式ruby在公共文件夹中的静态页面中

发布时间:2020-12-17 02:54:00 所属栏目:百科 来源:网络整理
导读:我有一个导航按钮,通过Lightbox 2加载一个新页面(create.html.erb). create.html.erb放在公用文件夹中. 一切都很好,但嵌入的ruby不起作用. div class="addButtons" div id="addPromotion" Add a Promotion div id="promotionInfo" %= render 'shared/promoti
我有一个导航按钮,通过Lightbox 2加载一个新页面(create.html.erb).

create.html.erb放在公用文件夹中.

一切都很好,但嵌入的ruby不起作用.

<div class="addButtons">
    <div id="addPromotion">
        Add a Promotion
        <div id="promotionInfo">
            <%= render 'shared/promotion_form'%>
        </div>          
    </div>
    <div id="createBoard">
        Create a Board
    </div>
</div>

页面将其加载为文本而不是实际呈现.我试过做一个链接,它工作正常.

解决方法

公用文件夹仅用于静态内容 – 不会在这些文件上运行渲染引擎.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读