2

我已经在我的“核心”引擎上安装了设计。注销链接是:core.destroy_user_session_path

我刚刚安装了active_admin。大部分工作正常,除了注销链接。在配置文件中,我发现以下内容:

  # == Logging Out
  #
  # Active Admin displays a logout link on each screen. These
  # settings configure the location and method used for the link.
  #
  # This setting changes the path where the link points to. If it's
  # a string, the strings is used as the path. If it's a Symbol, we
  # will call the method to return the path.
  #
  # Default:
  config.logout_link_path = "core.destroy_user_session_path".to_sym
  # config.logout_link_path = "/core/users/sign_out" --> this works!

  # This setting changes the http method used when rendering the
  # link. For example :get, :delete, :put, etc..
  #
  # Default:
   config.logout_link_method = :delete

我得到的错误信息是:

NoMethodError - undefined method `core.destroy_user_session_path' for #<ActiveAdmin::Views::TabbedNavigation:0x007f936dc8a8e0>:
  arbre (1.0.1) lib/arbre/element.rb:177:in `method_missing'
  /Users/krg07/.bundler/ruby/2.0.0/active_admin-a9949c152420/lib/active_admin/view_helpers/method_or_proc_helper.rb:56:in `call_method_or_proc_on'

有任何想法吗?我有一种感觉,它正在“admin”命名空间中调用该方法,因此它找不到该方法。如果是这种情况,我将如何解决这个问题?

谢谢!

4

0 回答 0