Mar 31, 2012

Splitting Rails Routes

Problem: We have ever growing list of our rails routes. Coupled with those routes are some that we need only for our non-production environments. This results in a rails env checks all over the place; like this: Of course this is not an ideal situation to be. This leaking over to production can be a simple side effect of removing those conditions mistakenly.

Apart from reasons stated here and for better routes management I know there is a strong case to split routes often. Here is how you can achieve it: