class
PgORM::Error::RecordNotSaved
- PgORM::Error::RecordNotSaved
- PgORM::Error
- Exception
- Reference
- Object
Overview
Raised when a record cannot be saved to the database.
This can occur when:
- Attempting to save a destroyed record
- Database constraints are violated
- The database operation fails
Example
user = User.find(1)
user.destroy
user.save! # Raises RecordNotSaved: "Cannot save a destroyed record!"