用于iOS自定义URL方案的Rails邮件程序链接

时间:2013-06-05 21:24:12

标签: ruby-on-rails ruby devise

我有一个带有Rails后端的iOS应用程序,并为应用程序设置了自定义URL方案,以便在myapp://的移动Safari上打开链接将启动我的应用程序。在Rails中,我正在尝试在我的密码重置模板(来自Devise)中包含这样的链接。但是当我使用

<%= link_to "CLICK HERE", "myapp://" %>

生成的链接无法点击。当我在不用于邮寄的视图中使用相同的代码时链接工作正常。我错过了什么?

使用电子邮件中呈现的html进行了更新

Sent mail to user@example.com (1989ms)
Date: Wed, 05 Jun 2013 15:34:06 -0700
From: Support <support@company.com>
Reply-To: Support <support@company.com>
To:user@example.com
Message-ID: <51afbcde21b30_7b5e3fea39834ce0847d@Computer.local.mail>
Subject: Reset password instructions
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit

<p>Hello user@example.com!</p>
<p>Someone has requested a link to change your password, and you can do this through the    link below.</p>
<p>If you're accessing this email on an iPhone you can reset your password directly by clicking <a href="myapp://">HERE</a></p>
<p>OR</p>
<p><a href="http://company.com/reset_password?   reset_password_token=bs1ra4mfzJwsyRBdzJoh">Change my password</a></p>
<br>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>

Redirected to http://company.com/users/sign_in

0 个答案:

没有答案