title: Get Remote IP Address in Rails Model
body: <p>I am attempting to do the following based on <a href="http://www.rubydoc.info/docs/rails/3.2.8/ActionDispatch%2FRemoteIp%2FGetIp%3Acalculate_ip" rel="nofollow">ActionDispatch::RemoteIp::GetIp#calculate_ip</a> </p>
  
  <pre><code>&gt;&gt; ActionDispatch::RemoteIp::GetIp.calculate_ip
  </code></pre>
  
  <p>However, I see this error:</p>
  
  <pre><code>!! #&lt;NoMethodError: undefined method `calculate_ip' for ActionDispatch::RemoteIp::GetIp:Class&gt;
  </code></pre>
  
  <p>So the question is, if this approach is flawed, how do I get the remote IP in the model?</p>