Resolving client side routes in Rails

There’s a quick and easy way to satisfy client side routing in a Rails application. Rails will automatically try to resolve it’s routing on the server side and throw an immediate 404 if no valid pages exist. Since my main application at work is a React SPA I needed a way to resolve routes to the client and not let them get caught by the server and throw a 404. The (/*path) method route ‘helper’ allows through any route so it can then be handled elsewhere. ...

January 9, 2021 · 2 min · JD