Closed sudharsans closed 10 years ago
Hello When I update an existing user in the User model, I am getting this error message. Could you please help?
ActiveRecord::StatementInvalid (SQLite3::ConstraintException: PRIMARY KEY must be unique: UPDATE "users" SET "confirmation_token" = ?, "current_sign_in_at" = ?, "id" = ?, "is_admin" = ?, "last_sign_in_at" = ?, "unconfirmed_email" = ?, "unlock_token" = ?, "updated_at" = ? WHERE "users"."id" = 3):
Thank you
It looks like you're trying to update User#id which can cause problems. What is the ruby code that generated the error?
Probably same issue https://github.com/starterkits/rails4-starterkit/issues/23
Hello When I update an existing user in the User model, I am getting this error message. Could you please help?
ActiveRecord::StatementInvalid (SQLite3::ConstraintException: PRIMARY KEY must be unique: UPDATE "users" SET "confirmation_token" = ?, "current_sign_in_at" = ?, "id" = ?, "is_admin" = ?, "last_sign_in_at" = ?, "unconfirmed_email" = ?, "unlock_token" = ?, "updated_at" = ? WHERE "users"."id" = 3):
Thank you