How to programtically reroute all my request to the login page in production on a Rails app, while keeping access to the other anonymous access pages in development.
For example if I have a request for http://www.mywebsite.com/listings I want to show them up in development but to redirect it to the login page in production with the main purpose to keep my app in stealth mode until is release.
Is there a best well-know way to do this, because I think is a very common problem?
In your application controller…
And in your login controller
And here your go! 🙂