我正在使用带有设计的活动管理,并且尝试为所有活动管理路由设置命名空间。
在 active_admin.rb 中,我将 default_namespace 设置为,
config.default_namespace = :abc_123
在我的路线中,
devise_for :admin_users, ActiveAdmin::Devise.config
ActiveAdmin.routes(self)
生成的路线是这样的,
root GET / pages#home
new_admin_user_session GET /abc_123/login(.:format) active_admin/devise/sessions#new
admin_user_session POST /abc_123/login(.:format) active_admin/devise/sessions#create
admin_root GET /admin(.:format) admin/dashboard#index
abc_123_root GET /abc_123(.:format) abc_123/dashboard#index
abc_123_quotes GET /abc_123/quotes(.:format) abc_123/quotes#index
POST /abc_123/quotes(.:format) abc_123/quotes#create
abc_123_quote GET /abc_123/quotes/new(.:format) abc_123/quotes#new
edit_abc_123_quote GET /abc_123/quotes/:id/edit(.:format) abc_123/quotes#edit
abc_123_quote GET /abc_123/quotes/:id(.:format) abc_123/quotes#show
batch_action_abc_123_users POST /abc_123/users/batch_action(.:format) abc_123/users#batch_action
abc_123_users GET /abc_123/users(.:format) abc_123/users#index
登录有效,我可以使用我的 activeadmin 帐户登录,但在仪表板上它会因错误而中断,
ActionView::Template::Error (undefined method `abc123_users_path' for ActiveAdmin::Helpers::Routes:Module):
1: insert_tag active_admin_application.view_factory["page"]
所有其他活动管理页面也会因相同的错误而中断。
我的路线中没有“abc123_users_path”路径。我没有从这条路线添加到活动管理页面的地方得到信息。
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)