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