Search code examples
ruby-on-railsrubypuma

How to keep the Ruby on Rails default information page?


I'm looking for a way to keep the Ruby on Rails "default information page." In Rails 7, it is the page that shows the Rails logo in the center and the version numbers on the bottom for Ruby, Rails, etc. Once you add your routes to the config/routes.rb file, the default page no longer shows. I'd like it to be my index page for simple experimental projects at home. Any ideas? Maybe it's associated with the Puma webserver? Thanks!


Solution

  • This page is coming from rails, and it's handled by the WelcomeController. To keep it, simply add the following route to your routes file:

      get 'your-unique-path', to: 'rails/welcome#index'
    
      # or
    
      root to: 'rails/welcome#index'