0

I'm sending emails from rails, and using the *_url helper to generate urls.

However, these links are starting:

https://admin.test.website.co.uk/

(which is what the URL used to start with), whereas they should start:

https://production.test.website.co.uk/

Anyone know what could be going wrong..?

tshepang
  • 12,111
  • 21
  • 91
  • 136
tiswas
  • 2,041
  • 7
  • 31
  • 43
  • can you paste your routes here? – VP. Mar 09 '11 at 13:37
  • surely routes only controls paths (i.e. the bit at the end of the URL), not the base of the URL..? – tiswas Mar 09 '11 at 14:37
  • well normally you pass resources to those helpers and it "figures" out how to build the url. AFAIK it has everything to do with, specially if you are are using "your_resourcename"_url – VP. Mar 09 '11 at 15:23

1 Answers1

0

What I think is going on is that you send the e-mails from your admin-interface. When using a generated _url helper, the host is generated from your current host, if present. If you want to override this, you can specify the host yourself using a variable or even hard-code it.

So, for example, instead of using page_url, you could use page_url(:host => 'https://production.test.website.co.uk/')

Good luck!

Jaap Haagmans
  • 6,232
  • 1
  • 25
  • 30