Forum: Ruby on Rails Getting app comple URL based on the environment

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Carlos (Guest)
on 2007-02-20 00:06
(Received via mailing list)
I'm building an email with a URL on it that change depending on the
environment I'm at. For example http://localhost:3000/demo on
development and on production.

Is there any environment variable or method that could tell me the
complete URL of my web application? I'm looking for an alternative to
environment config files.
Ed Hickey (Guest)
on 2007-02-20 00:29
(Received via mailing list)
request.domain in your controller should do it

This topic is locked and can not be replied to.