-
Notifications
You must be signed in to change notification settings - Fork 9
/
routes.rb
51 lines (41 loc) · 1.93 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
require 'sidekiq/web'
Rails.application.routes.draw do
ActiveAdmin.routes(self)
get 'account', to: 'dashboard#index', as: 'dashboard'
get 'api/events', to: 'api#events'
get 'about', to: 'home#about', as: :about
get 'fellowship', to: 'home#fellowship', as: :fellowship
get 'visit', to: 'home#visit', as: :visit
get 'study-with-us', to: 'home#study_with_us', as: :study_with_us
get 'residency', to: 'home#residency', as: :residency
get 'residents', to: 'home#residents', as: :residents
get 'scholarships', to: 'home#scholarships', as: :scholarships
get '2023', to: 'home#course2023', as: :course2023
get '2024', to: 'home#course2024', as: :course2024
get 'donate', to: redirect('https://donate.stripe.com/cN25lPeUe3qO5zyfYY'), as: :donate_redirect
get 'shop', to: redirect('https://nwspk.myshopify.com/'), as: :shop
get 'feedback', to: redirect('https://forms.gle/NLZ8JQdDFeuToWgF6'), as: :feedback
get 'rationclub', to: redirect('https://forms.gle/T3rXorsrb4gXKazv9'), as: :rationclub
get 'library', to: 'home#library', as: :library
get 'jobs', to: 'home#jobs', as: :jobs
post 'webhooks', to: 'webhooks#index'
# LCPT routes
get 'lcpt', to: 'lcpt#index', as: :lcpt
resource :subscription, only: [:edit, :update, :destroy] do
get :checkout
get :process_card
end
resource :user, only: [:edit, :update]
resources :events, only: :index
devise_for :users, path: 'account', controllers: { registrations: 'users/registrations' }
devise_scope :user do
get 'membership', to: 'users/registrations#new'
post 'create-checkout-session', to: 'subscriptions#create_checkout_session', as: :create_checkout_session
post 'customer-portal', to: 'subscriptions#customer_portal', as: :customer_portal
end
authenticate :user, lambda { |u| u.admin? } do
mount Sidekiq::Web => '/sidekiq'
end
root to: 'home#index'
get '*unmatched_route', to: 'application#route_not_found', constraints: { format: :html }
end