28 lines
1.1 KiB
Ruby
28 lines
1.1 KiB
Ruby
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
|