title: How to retrieve the current URL within a class?
body: <p>I'm trying to retrieve the full URL of my site (including the https://) in a controller in Ruby. I need it to fit in the following code:</p>
  
  <pre><code>url = ""
  uri = URI::parse(url)
  id = uri.path.split('/')[2]
  </code></pre>
  
  <p>Thanks.</p>