ActionMailer is expecting the constant SITE to be initialized.
I could put
SITE = ‘http://localhost:3001’
in development.rb
but
what I would like to do is to set this constant programmaticly to the
current site.
Is there a way to do this?
ActionMailer is expecting the constant SITE to be initialized.
I could put
SITE = ‘http://localhost:3001’
in development.rb
but
what I would like to do is to set this constant programmaticly to the
current site.
Is there a way to do this?
env[‘HTTP_HOST’]
Maybe?
Hi Ralph,
On Thu, 2010-01-07 at 18:27 +0100, Ralph S. wrote:
Is there a way to do this?
You can do:
if RAILS_ENV == ‘development’
SITE = ‘http://localhost:3001’
else
SITE = ‘http://www.yoursite.com’
end
HTH,
Bill
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs