I'm finishing the different localizations of my site and i got a little issue in Devise email templates.
In confirmation email for instance, i have translated it all, but the link to confirm the account is auto generated using this snippet:
<%= link_to t('devise.mailer.confirmation_instructions.confirm_link'), confirmation_url(@resource, :confirmation_token => @token) %>
This auto generated link points always to my .com web version and i want it to be conditional depending on the domain (.com/.es). When the link is not auto generated i can accomplish that using:
if request.host.split('.').last == "com"
or
if request.host.split('.').last == "es"
But in this case, i don't know how i can do it.
Any suggestion?
Thanks.