An example that has caused me to have to use a config.yml, ActionMailer will not have request.* available. System calls would not work in this case either, since they would return a bad value on vhosts or in cases where the hostname is different than request.host.
-eric On Nov 19, 11:57 am, Frederick Cheung <frederick.che...@gmail.com> wrote: > On Nov 19, 7:55 pm, explainer <keburg...@gmail.com> wrote: > > > I would like my Rails app to supply a callback url to another app. I > > currently have a yaml file in the config folder in which I put the > > host name, but I would like to be able to query that dynamically and > > do away with the yaml file. Is there a method call that returns the > > current host? > > Sort of - a given request has a host name (look at the methods on > ActionController::Request), obviously you can only get at that inside > a controller action. > > Fred -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.