i need to access the host name (and probably the port) inside
actionmailer.
i need to send a link to something in the public/images directory.
in any normal page, i can access this via the request.env variable, but
it looks like this variable is not defined in actionmailer..
what i would like to do is have it send the correct link via email, no
matter what server i run it from (my development machine, the test
server, or the production server).
so on the my development server, it would spit out:
http://localhost:3000/images/logo.gif
on the test server, it would spit out:
http://www.<testdomain>:3000/images/logo.gif
and on the live one, it would spit out:
http://www.<liveserver>.com/images/logo.gif
any ideas?
thanks!
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---