Is it possible in a controller to form an absolute uri from the relative path
to another controller action?
In rails application, specifically from a controller,
I am trying to redirect to outside link with a back redirection link set in params,
so that outside application could redirect back to my application at that address.
From ‘mypath/1’ in development environment the function would return
http://localhost/mypath/1
In deployed environment it would return
http://mysite.com/mypath/1
Update:
for my purpose url_for fits well:
url_for :controller => 'tasks', :action => 'testing', :host => 'somehost.org', :number =>
'33' # => 'http://somehost.org/tasks/testing?number=33'
So, the question’s resolved.
What I was looking is: