Skip to content

Commit 80bba32

Browse files
committed
Configure InertiaRails parent controller and fixed routes helper
1 parent e2dfdcf commit 80bba32

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

app/controllers/inertia_rails/static_controller.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/frontend/routes/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @file Generated by js-routes 2.3.5. Based on Rails 8.0.2 routes of InertiaRailsShadcnStarter::Application.
3-
* @version 15856b6545f535f9daf72484affe6c4605b22d1f92abdc271f0818d80cb9b39a
3+
* @version 743c630cafd479b5d9ad42a7803e8be1fdeb9448419ce21d215b267e2b0ae749
44
* @see https://github.com/railsware/js-routes
55
*/
66
declare type Optional<T> = {

app/frontend/routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @file Generated by js-routes 2.3.5. Based on Rails 8.0.2 routes of InertiaRailsShadcnStarter::Application.
3-
* @version 15856b6545f535f9daf72484affe6c4605b22d1f92abdc271f0818d80cb9b39a
3+
* @version 743c630cafd479b5d9ad42a7803e8be1fdeb9448419ce21d215b267e2b0ae749
44
* @see https://github.com/railsware/js-routes
55
*/
66
// eslint-disable-next-line

config/initializers/inertia_rails.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
InertiaRails.configure do |config|
44
config.version = ViteRuby.digest
55
config.encrypt_history = true
6+
7+
config.parent_controller = "::InertiaController"
68
end

config/routes.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
resource :password, only: [:show, :update]
2222
resource :email, only: [:show, :update]
2323
resources :sessions, only: [:index]
24+
inertia :appearance
2425
end
2526

26-
inertia "settings/appearance" => "settings/appearance"
27-
2827
root "home#index"
2928

3029
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.

0 commit comments

Comments
 (0)