Hey folks,
I have a bit of a frustrating problem with requests for favicon.ico
generating all sorts of errors in my log files. The problem is that the
default routes.rb file has the following line:
map.connect ':controller/:action/:id.:format'
If I’m requesting http://localhost:3000/user/list/3 then firefox will
automatically generate a request for the favicon.ico file at
http://localhost:3000/user/list/favicon.ico .
This gets matched by the above route and Rails throws an error like
this:
ActiveRecord::RecordNotFound (Couldn't find User with ID=favicon):
How do I get Rails to match favicon requests properly? Alternatively
how can I get mongrel to realize that favicon.ico requests always need
to go to the /public folder.
Maybe it’s just ocd, but I’d like to keep my dev logs clear of all these
crappy errors.
Thanks for your help,
Mike