Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

53 lines
1.5 KiB

Rails.application.routes.draw do
devise_for :admin_users, ActiveAdmin::Devise.config
devise_for :users, controllers: {
passwords: "auth/passwords",
sessions: "auth/sessions",
}, path_names: { sign_in: "sign-in", sign_out: "sign-out" }
devise_scope :user do
get "confirmations/reset", to: "auth/passwords#reset_confirmation"
end
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
ActiveAdmin.routes(self)
root to: "test#index"
get "about", to: "about#index"
resources :users do
member do
get "password/edit", to: "users#edit_password"
end
end
resources :organisations do
member do
get "details", to: "organisations#details"
get "users", to: "organisations#users"
get "users/invite", to: "users/account#new"
end
end
form_handler = FormHandler.instance
form = form_handler.get_form("2021_2022")
resources :case_logs, path: "/case-logs" do
collection do
post "bulk-upload", to: "bulk_upload#bulk_upload"
get "bulk-upload", to: "bulk_upload#show"
end
member do
post "form", to: "form#submit_form"
end
form.pages.map do |page|
get page.id.to_s.dasherize, to: "form##{page.id}"
get "#{page.id.to_s.dasherize}/soft-validations", to: "soft_validations#show" if page.has_soft_validations?
end
form.subsections.map do |subsection|
get "#{subsection.id.to_s.dasherize}/check-answers", to: "form#check_answers"
end
end
end