Rails.application.routes.draw do # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Can be used by load balancers and uptime monitors to verify that the app is live. get "up" => "rails/health#show", as: :rails_health_check # Render dynamic PWA files from app/views/pwa/* (remember to link manifest in application.html.erb) # get "manifest" => "rails/pwa#manifest", as: :pwa_manifest # get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker # Defines the root path route ("/") root to: redirect("/environment?id=1") resources :schedules do member do get "view" get "schedule_edit" post "reset" end collection do post "schedule_edit_update" end end resources :modals do collection do post :open end end resources :environment do member do get "edit_temp" get "edit_humidity" get "edit_co2" get "edit_area" end collection do post "edit_temp_update" end end resources :nutrient do member do get "edit_ph" get "edit_ec" get "edit_mixa" get "edit_mixb" end collection do post "edit_temp_update" end end resources :rack end