Created
May 24, 2018 21:40
-
-
Save marlosirapuan/7921312aa74a78aa19c55d375cc44471 to your computer and use it in GitHub Desktop.
Simple catch all routes in Rails 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.routes.draw do | |
# your routes bla bla | |
# your root controller | |
root to: 'home#index' | |
# at the end | |
get '*path', to: redirect('404') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment