add glob patten for missing routes
This commit is contained in:
@@ -8,6 +8,10 @@ class StaticController < ApplicationController
|
||||
redirect_to(url || posts_path)
|
||||
end
|
||||
|
||||
def not_found
|
||||
render text: "not found", status: :not_found
|
||||
end
|
||||
|
||||
def error
|
||||
end
|
||||
end
|
||||
|
||||
@@ -420,4 +420,6 @@ Rails.application.routes.draw do
|
||||
get "/intro" => redirect("/explore/posts/intro")
|
||||
|
||||
root :to => "posts#index"
|
||||
|
||||
get "*other", :to => "static#not_found"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user