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? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Ralph, On Thu, 2010-01-07 at 18:27 +0100, Ralph Shnelvar wrote:> 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?You can do: if RAILS_ENV == ''development'' SITE = ''http://localhost:3001'' else SITE = ''http://www.yoursite.com'' end HTH, Bill -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
env[''HTTP_HOST''] Maybe? On 1/7/10 9:27 AM, "Ralph Shnelvar" <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.