2

我有一个带有 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
4

0 回答 0