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
You can either use
request.original_url
or
"#{request.protocol}#{request.host_with_port}"
to get the current URL.