Colon_Cancer_Predict2/config/routes.rb

28 lines
1.1 KiB
Ruby
Raw Normal View History

2022-05-23 10:37:39 +00:00
Rails.application.routes.draw do
if ENV['worker_num']=='0' && File.basename($0) != 'rake' && !Rails.const_defined?('Console')
Thread.new do
c = Coloncancerpredictfields2s.last
if c
sleep(5)
c.save
c.auto_write_predict_js
end
end
end
locales = Site.first.in_use_locales rescue I18n.available_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
get 'coloncancerpredict2s' , to: 'coloncancerpredict2s#index'
get 'editColoncancerpredict2s' , to: 'coloncancerpredict2s#edit'
post 'editColoncancerpredict2s' , to: 'coloncancerpredict2s#edit'
patch 'editColoncancerpredict2s' , to: 'coloncancerpredict2s#edit'
get 'coloncancerpredict2s/showSubmit' , to: 'coloncancerpredict2s#showSubmit'
get 'coloncancerpredict2s/export_cancer_tool_record' , to: 'coloncancerpredict2s#export_cancer_tool_record'
resources :coloncancerpredict2s
end
get "coloncancerpredict2Result", to: "coloncancerpredict2s#calculate"
post "coloncancerpredict2Result", to: "coloncancerpredict2s#calculate"
end
end