2012-08-25 19 views

回答

1

的路徑必須要有人是這樣的:煉油廠::核心:: Engine.routes.url_helpers.your_object_admin_your_object_path

3

我發現自己不得不忍受refinery.route_path與煉油廠網址幫手,所以你的情況,refinery.contacts_save_contact_path可能做的伎倆

3

您必須訪問實際應用程序的url_helpers,這取決於應用程序的名稱空間。例如:

在配置/ routes.rb中:

MyApp::Application.routes.draw do 
    resources :foos 

    mount Refinery::Core::Engine, at => '/' 
end 

而且rake routes顯示:

foos GET /foos(.:format) foos#index 
refinery /    Refinery::Core::Engine 

您應該能夠使用:

MyApp::Application.routes.url_helpers.foos_path

0

main_app.contacts_save_contact_path應工作。