Navigation Menu

Skip to content
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

Remove custom errors page section from the guides #17815

Merged
merged 1 commit into from Dec 11, 2014

Conversation

yuki24
Copy link
Contributor

@yuki24 yuki24 commented Nov 28, 2014

This pattern is error-prone and introduces a lot of edge cases:

I've seen many people who have done this, most of which have run into an issue. I believe we should stop doing config.exceptions_app = self.routes and use static error pages, or use the rambulance gem as a temporary solution.

@rafaelfranca
Copy link
Member

Agree. I'm just not sure about linking to rambulance. Not saying that it is not good enough, it is just that I never used so I'm reluctant to recommend something I never used in official documentation.

@fxn @matthewd WDYT?

@fxn
Copy link
Member

fxn commented Nov 28, 2014

Yep, we generally don't link to external material, gems, videos, talks, etc.

@yuki24
Copy link
Contributor Author

yuki24 commented Nov 28, 2014

Yeah, I don't think linking is a good idea at this point. I'll remove it.

This pattern is too problematic and introduces a lot of edge cases:

  * On 4.2, the issue rails#15124 is
    back again.
  * needs to define each action for each http status otherwise the
    router raises ActionController::RoutingError (No route matches).
  * If the router has `match "/*username",...` and some action is
    missing, Rails will pick up the "match" and try to do its job.
  * encourages people to copy & paste programming. Not DRY.

[ci skip]
@yuki24 yuki24 force-pushed the remove-custom-errors-page-section branch from a4f9479 to cbcec99 Compare November 28, 2014 17:39
@yuki24
Copy link
Contributor Author

yuki24 commented Nov 28, 2014

updated.

@yuki24
Copy link
Contributor Author

yuki24 commented Dec 9, 2014

Any chance to get this merged into master and 4-2-stable? I really don't want any more people to follow this pattern.

@yuki24
Copy link
Contributor Author

yuki24 commented Dec 11, 2014

@rafaelfranca Sorry for pushing this again, but please do consider merging this before 4.2.0 is out.

zzak pushed a commit that referenced this pull request Dec 11, 2014
Remove custom errors page section from the guides [ci skip]
@zzak zzak merged commit b5001ea into rails:master Dec 11, 2014
zzak pushed a commit that referenced this pull request Dec 11, 2014
Remove custom errors page section from the guides [ci skip]
@zzak
Copy link
Member

zzak commented Dec 11, 2014

@yuki24 committed and backported in 11bbf15

@rafaelfranca What is 4-2-0 branch?

@yuki24
Copy link
Contributor Author

yuki24 commented Dec 12, 2014

@zzak Thanks!

@yuki24 yuki24 deleted the remove-custom-errors-page-section branch December 12, 2014 00:04
@rafaelfranca
Copy link
Member

@zzak it is the release branch. The release will be done from that branch. You should backport it too.

h-lame added a commit to alphagov/transition that referenced this pull request Mar 16, 2016
As of rails 4.2 it's no longer mentioned in the guide as something to
consider doing to get dynamic error pages.  See: rails/rails#17815
Setting an exceptions_app is still documented, but setting it to
self.routes is not.  It still works for us, but we should be aware that
this might be a blocker to future upgrades.
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.

None yet

4 participants