Skip to content

Display custom 404 page: invalid route / record not found - Bounty #428 #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 25, 2014

Conversation

codebender
Copy link
Contributor

Custom 404 page not being displayed when visiting an invalid path

  • rescue_from ActionController::RoutingError doesn’t do anything
  • unless Rails.env.production? made record not found work
  • added tests! :-)
  • new ErrorsController
  • handle 422 & 500 errors with public pages
  • annotate routes

ℹ️ The reason the error paths are not at the bottom of the routes file is because the /:username route 😸

To test in development:
https://github.com/assemblymade/coderwall/blob/master/config/environments/development.rb#L13

#config/environments/development.rb
config.consider_all_requests_local            = false

- rescue_from ActionController::RoutingError doesn’t do anything
- `unless Rails.env.production?` made record not found work
- added tests! :-)
- new errors controller
- handle 422 & 500 errors with public pages
- annotate routes
just3ws added a commit that referenced this pull request Nov 25, 2014
Display custom 404 page: invalid route / record not found - Bounty #428
@just3ws just3ws merged commit 9035ebf into coderwall:master Nov 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants