Can anyone help me to find out the syntax to access the environment variable that has the site domain? Maybe HTTP_HOST? i have tried to find documentation on how to access such a variable, but with no luck. Can someone help me (even if it is just pointing me in the right direction for searching)? Thanks, Tolstoy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The three biggies are - params - response - session I think you will find HTTP stuff in response (just do a ''puts response.inspect'')... On Oct 13, 12:43 am, Leo Tolstoy <noah...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Can anyone help me to find out the syntax to access the environment > variable that has the site domain? Maybe HTTP_HOST? > i have tried to find documentation on how to access such a variable, > but with no luck. Can someone help me (even if it is just pointing me > in the right direction for searching)? > Thanks, > Tolstoy--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10/13/07, nigel.bris <nigel.bris-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > The three biggies are > - params > - response > - session > > I think you will find HTTP stuff in response (just do a ''puts > response.inspect'')...This is a request thing, isn''t it? I''d look in request.env, and possibly ENV. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I was able to get the effect that I was after by using the following in an rhtml file: http://<%= request.server_name %>:<%= request.server_port %>/ This seems like a hack though. By inspecting <%= debug(request.env) %> I can see that "HTTP_HOST" has the info that i am after, I just haven''t found a way to access that variable in an rhtml file. On Oct 13, 4:56 am, George <george.og...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 10/13/07, nigel.bris <nigel.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > The three biggies are > > - params > > - response > > - session > > > I think you will find HTTP stuff in response (just do a ''puts > > response.inspect'')... > > This is a request thing, isn''t it? > > I''d look in request.env, and possibly ENV.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---