Skip to content

Instantly share code, notes, and snippets.

@armstrjare
Created March 11, 2012 23:29
Show Gist options
  • Save armstrjare/2018671 to your computer and use it in GitHub Desktop.
Save armstrjare/2018671 to your computer and use it in GitHub Desktop.
# Monkey-patch routing layer to prevent Rails blindly using Object#inspect in generating error messages.
# This fixes super slow error responses on our app which has a large set of routes :)
# FIXME: We should remove this once Rails fixes this issue.
module ActionDispatch
module Routing
class RouteSet
alias inspect to_s
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment