We have recently migrated from rails 3.2.3 to Rails 3.2.5 and we are using Devise 2.0.4. In our application we have override the Devise controller just to utilize the omniauth with devise.
When we were using 3.2.3 version on Sign_UP everything was working fine as soon as we migrated to 3.2.5 resource.save stopped working, it does not show any failure or success message, just redirects to sign_in page
After that I tried resource.save! so that I could get the exact erorr, it raised following error message, but this is not true as in the Table there is no such record and even current content is also not saved
Completed 500 Internal Server Error in 1626644ms
ActiveRecord::RecordInvalid (Validation failed: User name has already been taken):
I have also tried it with Devise 2.1 and got the same result.
I have found the problem area. But it is little strange
In our current working Rails 3.2.3 app and we have this validation in our model, this is failing in the Rails 3.2.5
Reason is – User_name in the table as “nil” already available, and when next time we try to insert “user_name” as NIL it is checking for uniqueness of NIL and there it fails.
To fix this I have added :allow_nil option, but still my question is why did not it fail for rails 3.2.3