This is a follow up to link text about trying to remove the stack trace for routing errors out of my log, and to handle bad routes a little better. Here’s my relevant routes.rb entry and controller
map.default '*', :controller => 'error', :action => 'route_not_found'
class ErrorsController < ApplicationController
def route_not_found
logger.error("routing error for " + request.url)
end
end
I also tried map.connect, as that was recommended in a related thread, but that didn’t work either. Does the named route ‘map.default’ have a special meaning?
map.connect '*path', :controller => 'error', :action => 'route_not_found'as the very last route should work as you expect (see here under ‘Route Globbing’). If you hit that route what is happening? Also, have you restarted your server when changing routes?