I'm following this tutorial: http://wearestac.com/blog/dynamic-error-pages-in-rails
However, in my routes file, I have two custom routes:
get '/blog', to: 'blog_posts#index', as: :blog
get '/:id', to: 'blog_posts#show', as: :show_blog_post
When I go to a page that doesn't exist, it isn't redirecting to the error pages. Instead, it's giving me Completed 404 Not Found. Error during failsafe response: ActiveRecord::RecordNotFound.
The custom routes are somehow not making the error pages work. When I remove the custom routes, everything works fine.
How do I get my error pages to work with this? I would've thought that anything returning a 404 would be redirect to the ErrorsController, but that isn't happening.