error_messages_for and custom routes

My error messages run fine except when I use custom routes. Any ideas why that might be happening?