English 中文(简体)
在我点击电子邮件确认链接时设计登记确认冻结
原标题:devise registration confirmation freezes when I click email confirm link

在我的当地机器测试时,我会发现一些奇怪的行为:

(1) 首先,在我签字时,我把我转往主页,我看到一个闪电:

 "You have signed up successfully. However, we could not sign you in because your account is unconfirmed."

我认为,当用户仅仅走上创建账户的正确道路时,就难以看到一种警告性的信息。 我可以轻松地改变当地人/发展中国家的信息,但我只是想确认,这是设计的违约行为,而不是我设置的错误吗?

2) 我成功地收到一封附有确认链接的电子邮件:

<p>You can confirm your account through the link below:</p>

<p><a href="http://localhost:5000/accounts/confirmation?confirmation_token=MywxHuW3PWHvg6x2nUfG&amp;format=">Confirm my account</a></p>

当我点击电子邮件确认链接时,我看到了一个空白网页。

发展记录显示:

Started GET "/accounts/confirmation?confirmation_token=MywxHuW3PWHvg6x2nUfG&format=" for   127.0.0.1 at 2011-09-28 09:41:55 -0700
   Processing by Devise::ConfirmationsController#show as 
  Parameters: {"confirmation_token"=>"MywxHuW3PWHvg6x2nUfG"}
  SQL (0.9ms)   SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
 FROM pg_attribute a LEFT JOIN pg_attrdef d
 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
 WHERE a.attrelid =  "artists" ::regclass
 AND a.attnum > 0 AND NOT a.attisdropped
 ORDER BY a.attnum
  Artist Load (0.4ms)  SELECT "artists".* FROM "artists" WHERE   "artists"."confirmation_token" =  MywxHuW3PWHvg6x2nUfG  LIMIT 1
  SQL (0.8ms)   SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
  FROM pg_attribute a LEFT JOIN pg_attrdef d
  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
  WHERE a.attrelid =  "artists" ::regclass
  AND a.attnum > 0 AND NOT a.attisdropped
  ORDER BY a.attnum
   SQL (0.2ms)  BEGIN
   AREL (0.9ms)  UPDATE "artists" SET "confirmation_token" = NULL, "confirmed_at" =  2011-09-28 16:41:55.894603 , "updated_at" =  2011-09-28 16:41:55.895467  WHERE "artists"."id" = 85
  [paperclip] Saving attachments.
  SQL (0.8ms)  COMMIT
  SQL (0.1ms)  BEGIN
  AREL (0.5ms)  UPDATE "artists" SET "last_sign_in_at" =  2011-09-28 16:41:55.915779 , "current_sign_in_at" =  2011-09-28 16:41:55.915779 , "last_sign_in_ip" =  127.0.0.1 , "current_sign_in_ip" =  127.0.0.1 , "sign_in_count" = 1, "updated_at" =  2011-09-28  16:41:55.916532  WHERE "artists"."id" = 85
   [paperclip] Saving attachments.
  SQL (0.5ms)  COMMIT
  Completed 406 Not Acceptable in 231ms

它说的“不可接受” 这意味着什么? 它是否通过? 发生了什么?

问题回答

I figured it out. Apparently the link contained a "&format=" parameter at the end of the link. The devise views for emails were injecting the @resource causing the id of the resource to be put in as the format of the url (in this case it s blank because I m using params_to and the artist nickname as the id, and there is some other issue I m having with that not being populated... not related to this problem). I fixed the views and that has fixed the problem.





相关问题
Angle brackets in php

I want to store angle brackets in a string in PHP because i want to eventually use mail() to send an HTML email out. The following is the code that doesn t seem to work. while(...) { $msg .= "<...

authlogic auto_register feature using my options

I have auto registration working with authlogic using gaizka s version of authlogic_openid which I found on Github since pelle s original addition of the feature seemed to cause issues. http://...

Zend 邮件问题,涉及外国char子+ com子

泽斯德邮局在名称被定为具有外国性质(如“保”)和 com(”)的物品时,就放弃了一种例外(因为邮局(邮局)退回假)。 重新提出以下守则。

How to track an email in Java?

How I can track an email? I m using java on the server side for sending emails. I want to track whether it is delivered , opened, etc... How I can do that ?

Web Link in a mail is not rendering as link in yahoo

string from = "abc@gmail.com"; string to = "xyz@gmail.com,xyz@yahoo.co.in"; string password="abcxyz"; MailMessage mail = new System.Net.Mail.MailMessage(); mail.To.Add(to); mail.From = new ...

SharePoint - Approaching Website Storage Limit Email

How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it s size limit? Thanks for your ...

How to create an email mailing list

Im creating a coming soon page for a website im developing, and im adding an option for the user to enter their email address so we can email them when the site is up. How do I do this?

CCNet email does not include MSBuild results

We re using CCNet 1.4.4.83 but when an MSBuild task fails, we don t get the MSBuild results (i.e. missing file or whatever reason the compile failed) in the email notification. I do see the build ...

热门标签