Hi. I get a RecordNotSaved exception when trying to create a user
User Columns (0.005930) SHOW FIELDS FROM users
SQL (0.000465) BEGIN
SQL (0.000466) COMMIT
As you can see, there’s no INSERT SQL generated, which is the root cause
of the problem.
In my user model, I have the following call back:
self.password = Digest::SHA1.hexdigest(self.password)
self.verified = false
#logger.debug("–> "+self.to_s) #This is the magic line!!
The really really black magic part is that, if I comment the logging
statement in, and thereby call self.to_s, the user record gets added.
Can anyone come up with a somewhat rational reason for this behaviour?