I''ve installed the salted login generator and everything works fine except for the Account#verify method (called via the signup welcome email message). This is the link in the email: http://localhost:3000/account/verify/5b6d2faa994bae89b5ac871e963b41d60e67656e This is the error message: NoMethodError in Account#verify undefined method `verify'' for nil:NilClass app/controllers/account_controller.rb:107:in `verify'' script/server:48 The 2 important lines from Account#verify: user = User.find_by_uuid(@params[''id'']) user.verify I also noticed none of the other user methods can be called. Ideas? -- Derek Haynes Cell - 404.593.4879 Blog - http://itsderek23.blogspot.com
Joseph Hosteny
2005-Apr-26 18:26 UTC
Re: Salted Login Generator: Error with Account#verify
Derek, There are a few problems with the generator that I''m addressing currently. I will hopefully have a new release shortly (today or tomorrow - more testing as well). However, I don''t think there was a bug (that I was aware of) with the verify method in the current release. Also, you won''t be able to call any of the protected user methods until verification is complete, so if this method fails, you will be stuck. Are you running mysql? Can you look at the database after you signup, but before you click on the verify email? Just confirm for me that the user has been written to the DB. Otherwise, if you have public project access somewhere I can take a look. Joe On Apr 26, 2005, at 1:53 PM, Derek Haynes wrote:> I''ve installed the salted login generator and everything works fine > except for the Account#verify method (called via the signup welcome > email message). > > This is the link in the email: > http://localhost:3000/account/verify/ > 5b6d2faa994bae89b5ac871e963b41d60e67656e > > This is the error message: > > NoMethodError in Account#verify > > undefined method `verify'' for nil:NilClass > > app/controllers/account_controller.rb:107:in `verify'' > script/server:48 > > The 2 important lines from Account#verify: > > user = User.find_by_uuid(@params[''id'']) > user.verify > > I also noticed none of the other user methods can be called. > > Ideas? > > > -- > Derek Haynes > Cell - 404.593.4879 > Blog - http://itsderek23.blogspot.com > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 4/26/05, Derek Haynes <derek.haynes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve installed the salted login generator and everything works fine > except for the Account#verify method (called via the signup welcome > email message). > > This is the link in the email: > http://localhost:3000/account/verify/5b6d2faa994bae89b5ac871e963b41d60e67656e > > This is the error message: > > NoMethodError in Account#verify > > undefined method `verify'' for nil:NilClass > > app/controllers/account_controller.rb:107:in `verify'' > script/server:48 > > The 2 important lines from Account#verify: > > user = User.find_by_uuid(@params[''id'']) > user.verify > > I also noticed none of the other user methods can be called. > > Ideas? > > -- > Derek Haynes > Cell - 404.593.4879 > Blog - http://itsderek23.blogspot.com > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >I can''t say why this is happening with the salted login generator since I''ve never used it. But in your case, User.find_by_uuid returns a nil for some reason. -- rick http://techno-weenie.net
> I''ve installed the salted login generator and everything works fine > except for the Account#verify method (called via the signup welcome > email message).I hit this as well and found the issue to be the size of the UUID field in the db. The table def in the readme shows the uuid of size 30 but it generates a larger salt (40+).. Increase the size of the field and it works great M