check database.yml file in config directory
On Nov 20, 12:55 am, explainer 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
> d
request.host_with_port()
in rails 2.3.4 api
2009/11/20 shweta
> Try request.env['HTTP_HOST'] in the controller.
>
> --
>
> 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...@googlegroup
Try request.env['HTTP_HOST'] in the controller.
--
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+unsubs
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, Frede
request.env["SERVER_ADDR"] // this will return you server ip address
request.server_name or request.host // this will return host name
On Nov 20, 1:55 am, explainer 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 i
To find what the machine thinks its own name is (which may or may not
be related to the hostname you want in a callback url), try:
Socket.gethostname
As has been pointed out, the callback url also needs things like the
port. If you are generating this within a controller action, you could
of co
That assumes you are on the default port (80).
On Nov 19, 3:47 pm, Norm Scherer wrote:
> explainer 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 th
request.host
--
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 op
On Nov 19, 7:55 pm, explainer 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 metho
9 matches
Mail list logo