Created
March 13, 2019 15:31
-
-
Save antico5/f1fe6f4b06daaa28affe7a558f11976d to your computer and use it in GitHub Desktop.
catch-all action
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
get '*a', to: 'errors#error_404' | |
def error_404 | |
if request.format.html? | |
render :error_404, status: 404 | |
else | |
head 404, content_type: 'text/html' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment