title: What's the difference between request.remote_ip and request.ip in Rails?
body: <p>As the title goes, you can get the client's ip with both methods. I wonder if there is any differences. Thank you.</p>
  
  <p>in the source code there goes</p>
  
  <p>"/usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.3/lib/action
  _dispatch/http/request.rb" 257L, 8741C</p>
  
  <pre><code>def ip
    @ip ||= super
  end
  
  # Originating IP address, usually set by the RemoteIp middleware.
  def remote_ip
    @remote_ip ||= (@env["action_dispatch.remote_ip"] || ip).to_s
  end
  </code></pre>
  
  <p>but I really don't know the implications.</p>