Ruby on rails 4 添加';克隆';路由到现有restful控制器

Ruby on rails 4 添加';克隆';路由到现有restful控制器,ruby-on-rails-4,controller,routes,Ruby On Rails 4,Controller,Routes,我正在尝试将此方法添加到restful控制器(还有以下工作方法:index、:new、:create、:edit、:update和:destroy): 如何为“admin/class_section/:id/clone”添加路由 namespace :admin do get "class_sections/:id/clone", to: "class_sections#clone", as: "class_sections_clone" end Utg::Application.

我正在尝试将此方法添加到restful控制器(还有以下工作方法:index、:new、:create、:edit、:update和:destroy):

如何为“admin/class_section/:id/clone”添加路由

namespace :admin do    
  get "class_sections/:id/clone", to: "class_sections#clone", as: "class_sections_clone"
end
Utg::Application.routes.draw do

  devise_for :users
  root to: "home#index"
  namespace :admin do
    resources :class_sections, except: [:show]
  end

  resources :class_sections, only: [:index, :show]
end
namespace :admin do    
  get "class_sections/:id/clone", to: "class_sections#clone", as: "class_sections_clone"
end