Wrap all your routes in a constraints block:
constraints :ip => "your-ip-goes-here" do
Your Rails application will lose all routing knowledge if other people try to access it.
This method is very convenient if you want to restrain other things, for example, an example of an iPhone that shows documentation.
Ryan bigg
source share