まず、refinerycms アプリケーションを作成しました。アプリケーションの中で、自分のコントローラー ルート、アクション、およびビューを呼び出すことができず、次のようなエラーが発生しました。
undefined local variable or method `contacts_save_contact_path' for #<#<Class:0xafc9338>:0xb5467fc>
まず、refinerycms アプリケーションを作成しました。アプリケーションの中で、自分のコントローラー ルート、アクション、およびビューを呼び出すことができず、次のようなエラーが発生しました。
undefined local variable or method `contacts_save_contact_path' for #<#<Class:0xafc9338>:0xb5467fc>
私は自分自身がrefinery.route_path
製油所のURLヘルパーを使わなければならないことに気付いたので、あなたの場合、refinery.contacts_save_contact_path
トリックをするかもしれません
実際のアプリの url_helpers にアクセスする必要があり、それはアプリの名前空間に依存します。例えば:
config/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
パスは次のようなものである必要があります:Refinery :: Core :: Engine.routes.url_helpers.your_object_admin_your_object_path