Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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