[Rails] Write the process at the time of Routing Error --Qiita I tried to avoid the Routing Error by referring to this article, but some of the refile images are no longer displayed.
** The attachment url added by refile is the target of unmatched_route **
As a countermeasure for Routing Error
routes.rb
get '*unmatched_route', to: 'home#about'
And, when a route other than the route written in routes.rb is specified, it was set to jump to the about page, but the route of the newly registered attachment image is also regarded as unmached_route, and those The tragedy that only the image jumps to the about page.
Create a new config / initializers / refile.rb
config/initializers/refile.rb
Refile.automount = false
#refile unmount root automount
config/route.rb
mount Refile.app, at: Refile.mount_point, as: :refile_app
#refile Manual root mount
#All routes of attachment are acquired