File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33Rails . application . routes . draw do
4- devise_for :users , controllers : {
5- omniauth_callbacks : "users/omniauth_callbacks" ,
6- sessions : "users/sessions"
7- }
8- # Redirect to localhost from 127.0.0.1 to use same IP address with Vite server
9- constraints ( host : "127.0.0.1" ) do
10- get "(*path)" , to : redirect { |params , req | "#{ req . protocol } localhost:#{ req . port } /#{ params [ :path ] } " }
11- end
12- root "inertia_example#index"
13- get "inertia-example" , to : "inertia_example#index"
4+ draw :public
145
15- resources :items
6+ # Demo inertia
7+ draw :demo
168
17- # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
9+ # Authentication
10+ draw :devise
1811
19- # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
20- # Can be used by load balancers and uptime monitors to verify that the app is live.
21- get "up" => "rails/health#show" , as : :rails_health_check
22-
23- # Render dynamic PWA files from app/views/pwa/* (remember to link manifest in application.html.erb)
24- # get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
25- # get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
26-
27- # Defines the root path route ("/")
28- # root "posts#index"
12+ # Demo CRUD
13+ draw :items
2914end
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ root "inertia_example#index"
4+ get "inertia-example" , to : "inertia_example#index"
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ devise_for :users , controllers : {
4+ omniauth_callbacks : "users/omniauth_callbacks" ,
5+ sessions : "users/sessions"
6+ }
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ resources :items
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ # Redirect to localhost from 127.0.0.1 to use same IP address with Vite server
4+ constraints ( host : "127.0.0.1" ) do
5+ get "(*path)" , to : redirect { |params , req | "#{ req . protocol } localhost:#{ req . port } /#{ params [ :path ] } " }
6+ end
7+
8+ # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
9+
10+ # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
11+ # Can be used by load balancers and uptime monitors to verify that the app is live.
12+ get "up" => "rails/health#show" , as : :rails_health_check
13+
14+ # Render dynamic PWA files from app/views/pwa/* (remember to link manifest in application.html.erb)
15+ # get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
16+ # get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
17+
18+ # Defines the root path route ("/")
19+ # root "posts#index"
You can’t perform that action at this time.
0 commit comments