Fix the page break through out the application when url not found

To fix the page break through out the application when url not found follow the steps as below

Routes

match “:rest” => “application#notfound”, :constraints => { :rest => /.*/ }

Application Controller

def notfound
flash[:error] = “You need to login or sign up before continuing.”
redirect_to  “/members/login”
end