cancer_predict/config/routes.rb

28 lines
1007 B
Ruby
Raw Normal View History

2019-11-15 00:44:28 +00:00
Rails.application.routes.draw do
2022-05-23 10:37:59 +00:00
if ENV['worker_num']=='0' && File.basename($0) != 'rake' && !Rails.const_defined?('Console')
Thread.new do
c = Cancerpredictfields.last
if c
sleep(5)
c.save
c.auto_write_predict_js
end
end
end
2019-11-15 00:44:28 +00:00
locales = Site.first.in_use_locales rescue I18n.available_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
get 'cancerpredicts' , to: 'cancerpredicts#index'
2019-11-23 08:14:56 +00:00
get 'editCancerpredicts' , to: 'cancerpredicts#edit'
post 'editCancerpredicts' , to: 'cancerpredicts#edit'
patch 'editCancerpredicts' , to: 'cancerpredicts#edit'
get 'cancerpredicts/showSubmit' , to: 'cancerpredicts#showSubmit'
2020-02-03 08:47:49 +00:00
get 'cancerpredicts/export_cancer_tool_record' , to: 'cancerpredicts#export_cancer_tool_record'
2019-11-15 00:44:28 +00:00
resources :cancerpredicts
end
2020-02-06 07:50:25 +00:00
get "cancerpredictResult", to: "cancerpredicts#calculate"
post "cancerpredictResult", to: "cancerpredicts#calculate"
2019-11-15 00:44:28 +00:00
end
end