title: Relative URL to absolute in controller
body: <p>I need to turn relative URLs returned by Paperclip into absolute in controller. My solution for this:</p>
  
  <pre><code> root_url.chomp('/') + record.photo.url(:large)
  </code></pre>
  
  <p>Since this task is applicable not only to Paperclip I would like to know if there's a better way of doing it that doesn't involve any hardcoded values.</p>
  
  <p>There's a similar <a href="https://stackoverflow.com/questions/2695393/rails-building-an-absolute-url-in-a-models-virtual-attribute-without-url-helpe">post</a>, but none of the solutions from it worked for me.</p>