3

まず、refinerycms アプリケーションを作成しました。アプリケーションの中で、自分のコントローラー ルート、アクション、およびビューを呼び出すことができず、次のようなエラーが発生しました。

undefined local variable or method `contacts_save_contact_path' for #<#<Class:0xafc9338>:0xb5467fc>
4

4 に答える 4

3

私は自分自身がrefinery.route_path製油所のURLヘルパーを使わなければならないことに気付いたので、あなたの場合、refinery.contacts_save_contact_pathトリックをするかもしれません

于 2012-09-20T01:57:46.747 に答える
3

実際のアプリの 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

于 2013-07-18T21:39:06.297 に答える
1

パスは次のようなものである必要があります:Refinery :: Core :: Engine.routes.url_helpers.your_object_admin_your_object_path

于 2012-08-25T14:45:41.887 に答える