越来越多的 controller,越来越多的 action,发现基本的 crud action 无法满足需求之后,写了很多的自定义 action,以及对应的 url 地址。现在已经很长,感觉很难看,求助~!谢谢~!
get "role_menus/destroy"
get "role_menus/create"
get "role_menus/edit"
post "/menus/destroy_selected" => "menus#destroy_selected"
get "index/index"
post '/users/destroy' => 'users#destroy_selected'
post '/user/assign_role_to_user' => 'users#assign_role_to_user'
get '/roles/not_assigned_to_user' => 'roles#roles_not_assigned_to_user'
post '/roles/destroy' => 'roles#destroy'
post '/roles/assign_menu_to_role' => 'roles#assign_menu_to_role'
get '/menus/not_assigned_to_role' => 'menus#menus_not_assigned_to_role'
post '/operations/destroy' => 'operations#destroy_selected'
delete '/navigation/destroy_selected' => 'navigations#destroy_selected'
resources :menus do
resources :operations
end
resources :roles do
resources :menus
end
resources :users do
resources :roles
end
resources :operations
上面是其中的一部分。