请帮助我以格式添加自定义路由:
/projects/any-project-name/estimated_time/report
控制器:估计时间
方法:报告
routes.rb
Rails.application.routes.draw do
root :to => 'welcome#index', :as => 'home'
.....
get '/projects/:project_id/issues/gantt', :to => 'gantts#show', :as => 'project_gantt'
get '/issues/gantt', :to => 'gantts#show'
.....
resources :time_entries, :controller => 'timelog', :except => [:show, :edit, :update, :destroy] do
get 'report', :on => :collection
end
.....
resources :time_entries, :controller => 'timelog', :only => [:new, :create]
.....
end
发布于 2022-08-06 15:26:06
试试这个:get 'projects/:project_name_attribute/estimated_time/report' => 'estimatedtimes#report'
https://stackoverflow.com/questions/73260931
复制相似问题