How can I get the current absolute URL in my Ruby on Rails view?
The request.request_uri only returns the relative URL
request.request_uri
This works for Ruby on Rails 3.0 and should be supported by most versions of Ruby on Rails:
request.env['REQUEST_URI']