Skip to content

Commit 4d44228

Browse files
committed
Add a root path
1 parent 76a9339 commit 4d44228

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/generators/inertia/install/install_generator.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ def install_example_page
164164

165165
say 'Adding a route for the example Inertia controller'
166166
route "get 'inertia-example', to: 'inertia_example#index'"
167+
unless File.read('config/routes.rb').match?(/^\s*root\s+/)
168+
route "root 'inertia_example#index'"
169+
end
167170

168171
say 'Copying page assets'
169172
copy_files = FRAMEWORKS[framework]['copy_files'].merge(

0 commit comments

Comments
 (0)