Colon_Cancer_Predict1/config/routes.rb

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 = Coloncancerpredictfields1s.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 'coloncancerpredict1s' , to: 'coloncancerpredict1s#index'
get 'editColoncancerpredict1s' , to: 'coloncancerpredict1s#edit'
post 'editColoncancerpredict1s' , to: 'coloncancerpredict1s#edit'
patch 'editColoncancerpredict1s' , to: 'coloncancerpredict1s#edit'
get 'coloncancerpredict1s/showSubmit' , to: 'coloncancerpredict1s#showSubmit'
get 'coloncancerpredict1s/export_cancer_tool_record' , to: 'coloncancerpredict1s#export_cancer_tool_record'
resources :coloncancerpredict1s
end
get "coloncancerpredict1Result", to: "coloncancerpredict1s#calculate"
post "coloncancerpredict1Result", to: "coloncancerpredict1s#calculate"
end
end