class ApplicationController < ActionController::Base
before_filter :save_request_ip
def save_request_ip
session[:request_ip] = request.remote_ip
end
protected :save_request_ip
# :
# :
# rest of your ApplicationController code
# :
# :
end
Then read back the value from session[:request_ip] as needed.
The requester's IP may change from request to request, if they have
IP's assigned dynamically, for example. Not quite clear how this would
be a "short term debugging requirement". Also may require browser has
"cookies enabled", depending on what you're up to.