Ruby on rails 4.2 如何在controller.rb-rails 4中添加按钮链接
用户在我的网站注册后,需要激活他们的帐户。将向用户发送一封电子邮件。如果帐户未激活,用户将无法登录 一条消息将显示:“帐户未激活。请检查您的电子邮件中的激活链接。”如何在警告消息中创建一个链接或按钮,提示服务器向用户发送另一封激活电子邮件Ruby on rails 4.2 如何在controller.rb-rails 4中添加按钮链接,ruby-on-rails-4.2,Ruby On Rails 4.2,用户在我的网站注册后,需要激活他们的帐户。将向用户发送一封电子邮件。如果帐户未激活,用户将无法登录 一条消息将显示:“帐户未激活。请检查您的电子邮件中的激活链接。”如何在警告消息中创建一个链接或按钮,提示服务器向用户发送另一封激活电子邮件 我尝试了action\u item,我发现了一些错误: 您将在文件夹:app/views/*中放置指向helper的链接 因此,如果您尝试将其放在html.erb文件中,您应该能够看到正在生成的链接 link_to 'Resend the activatio
我尝试了
action\u item
,我发现了一些错误:
您将在文件夹:app/views/*中放置指向
helper的链接
因此,如果您尝试将其放在html.erb文件中,您应该能够看到正在生成的链接
link_to 'Resend the activation link.', :action => "try_resend", :controller => "PasswordResets"
对于控制器:
class PasswordResets < ApplicationController
def try_resend
puts 'You should see this in console'
end
end
类密码重置
您是否使用Desive处理电子邮件确认?否。我不是在用Desive。
class PasswordResets < ApplicationController
def try_resend
puts 'You should see this in console'
end
end