You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create a blank app and create some model, let's say it's called User, and give it an attribute called 'email' with a unique constraint on it
run amber console
run u = User.new(name: 'Sam', email: 'test@test.com')
run u.save
run u -- you will notice the u that gets printed has a unique constraint violation error on it, even though the save was actually successful. If you then run u = User.first, you will see the correctly saved user, without any constraint violation.
User, and give it an attribute called 'email' with a unique constraint on itamber consoleu = User.new(name: 'Sam', email: 'test@test.com')u.saveu-- you will notice theuthat gets printed has a unique constraint violation error on it, even though the save was actually successful. If you then runu = User.first, you will see the correctly saved user, without any constraint violation.