0

I am taking over a project where Devise is in use. No signup needed because users are created when they provide their email for another purpose. Then the user receives an email with the link to password setup.

Now I want to also allow signup, but it still searches for an existing email, as seen in the log (several user models, the one used here is Traveler):

Started POST "/en/travelers" for 127.0.0.1 at 2015-10-02 09:07:09 +0200
Processing by DeviseInvitable::RegistrationsController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"blah", "traveler"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up", "protocol"=>"https"}
Traveler Load (3.3ms)  SELECT  "travelers".* FROM "travelers"  WHERE "travelers"."email" = '[email protected]'  ORDER BY "travelers"."id" ASC LIMIT 1
(1.7ms)  BEGIN
Traveler Exists (2.4ms)  SELECT  1 AS one FROM "travelers"  WHERE "travelers"."email" = '[email protected]' LIMIT 1
(1.6ms)  ROLLBACK
Rendered devise/registrations/new.html.erb within layouts/auth/application (14.4ms)
Rendered layouts/auth/_flash.html.erb (0.3ms)
Rendered layouts/auth/_footer.html.erb (1.3ms)
Completed 200 OK in 282ms (Views: 153.6ms | ActiveRecord: 11.0ms)

I haven't seen anything in the routes or controllers that would make that happen, any ideas on where I could investigate?

1 Answer 1

0

I think that your traveller is invalid. E.g. traveller with this email exists. Check it and unique constraints.

1
  • Thanks for your input, I finally found the problem - another validation was failing (field cannot be blank in model, but is not present in registration form).
    – edhel
    Oct 12, 2015 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.