I want to change some of Rails’ routing code so that I can make routes
The code at http://wiki.rubyonrails.com/rails/pages/RoutingSubdomains
works fine when I edit the file (in my case,
Changing that file seems very fragile, so I figured I would override the
method in question in environment.rb instead. However, it seems my
routing code is never used for routing…
I added this to the end of environment.rb and rebooted the server:
“some text for testing”
Now, if I do this in some view, I get the output “some text for
but the new RouteSet#recognize method is obviously not being used for
actual routing, since the routing keeps on working.
If I change the method directly in routing.rb to simply return “some
text for testing”, routing breaks completely.
Again, could anyone please tell me what I’m doing wrong, and how to fix
I suppose a workaround would be to include Rails in the lib directory
and modify that, but that’s still a lot uglier than just modifying that