I ran into this problem again when I had a secondary object that I was trying to save along with a Devise user at registration/sign-up. I copied the entire create method so that the secondary object could prevent the Devise user from saving if it had an error. However, when I put that logic in and the user didn't save, I got the title error above.
The problem is that Devise's internal magic gets confused if the user isn't persisted but doesn't have any errors. The solution is to apply an error to resource.errors[:base], where resource is the Devise user.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment