簡體   English   中英

一台可安裝引擎與另一台可安裝引擎的訪問路徑

[英]Access routes of one Mountable engine from another mountable Engine

我正在制造一個新的可安裝引擎。 它是更大應用程序的一部分。 我正在嘗試使用另一個小型引擎的布局作為我的引擎,並且該引擎需要具有相同的布局。 為此,我的aaplication控制器如下所示:

class ApplicationController < AnotherEngine::ApplicationController
     layout "AnotherEngine/AnotherEngine"    #Pointing to the layout file of other engine
end

現在的問題是我的引擎無法識別並拋出其他引擎中的named_pa​​ths

ActionView::Template::Error (undefined local variable or method `some_path' for #<#<Class:0xbbd9524>:0xbbf85c8>)

為什么應用程序無法找到路徑? 當我轉到另一個引擎時,一切正常,但是當我的引擎嘗試使用另一個引擎的布局(又有一些命名路徑)時,出現這些錯誤。

路線應位於engine_name.named_pa​​th的宿舍中! 它將像魅力一樣工作:)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM