Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rishiip/ab0462e52fe932398a6ff44aa6180e53 to your computer and use it in GitHub Desktop.
Save rishiip/ab0462e52fe932398a6ff44aa6180e53 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment