instance method
local_request?
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
local_request?()
True if the request came from localhost, 127.0.0.1. Override this method if you wish to redefine the meaning of a local request to include remote IP addresses or other criteria.
Source
# File actionpack/lib/action_controller/rescue.rb, line 102
def local_request? #:doc:
request.remote_addr == LOCALHOST && request.remote_ip == LOCALHOST
end
Defined in actionpack/lib/action_controller/rescue.rb line 102
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Rescue