From 20f3159dd8b716856d2223324fc4ecbe58ce2321 Mon Sep 17 00:00:00 2001 From: Bilal Date: Fri, 4 Sep 2020 09:26:12 +0300 Subject: [PATCH] send unknown routes to the react router --- app/controllers/static_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb index a71771e..a89379a 100644 --- a/app/controllers/static_controller.rb +++ b/app/controllers/static_controller.rb @@ -13,5 +13,7 @@ class StaticController < ActionController::API def frontend_static full_path = "protected_public/#{params[:path]}.#{params[:format]}" send_file full_path + rescue ActionController::MissingFile + render file: 'protected_public/index.html' end end