ruby on rails - Devise: Email has already been taken but user deleted -


i using devise user models , i've deleted user admin panel, , confirmed user no longer in db using rails console. however, when try re-create user (they want sign again), i'm presented flash error message:

user failed created

  • email has been taken

checking db again, user still isn't there:

irb(main):007:0> user.find_by(email: 'user@example.com') => nil 

why happening , can fix this? devise keep ghosted user somewhere i'm not aware of?

thanks, justin

as turns out, had installed paranoia gem. had find user:

user.with_deleted.where(email: "user@example.com") 

to id, restore:

user.restore(the_id) 

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -