Skip to content

Instantly share code, notes, and snippets.

@marlosirapuan
Created May 24, 2018 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marlosirapuan/7921312aa74a78aa19c55d375cc44471 to your computer and use it in GitHub Desktop.
Save marlosirapuan/7921312aa74a78aa19c55d375cc44471 to your computer and use it in GitHub Desktop.
Simple catch all routes in Rails 5
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