我应该添加到我的routes.rb
文件中
Rails.application.routes.draw do
namespace :admin do
?
end
end
要获得以下路线?
admin_user_archivals PATCH /admin/users/:user_id/archivals(.:format)
admin/users/archivals#create
答案 0 :(得分:1)
namespace :admin do
patch 'users/:user_id/archivals', to: 'controller_name#action_name', as: 'user_archivals'
end