Skip to content

Instantly share code, notes, and snippets.

@skojin
Created January 24, 2011 15:17
Show Gist options
  • Save skojin/793355 to your computer and use it in GitHub Desktop.
Save skojin/793355 to your computer and use it in GitHub Desktop.
same as config.consider_all_requests_local but for production and only for specified ip address, rails 3.2
silence_warnings do
ActionDispatch::Request::LOCALHOST = (ActionDispatch::Request::LOCALHOST + ['192.168.0.1']).freeze
end
ActionController::Base.module_eval do
def show_detailed_exceptions?
request.local?
end
end
@skojin
Copy link
Author

skojin commented Jan 24, 2011

put it to config/initializers/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment