Update Records
Update with save
user = User.find(1)
if user
user.name = "Updated Name"
user.save
puts "Updated!"
endUpdate with save!
user = User.find!(1)
user.name = "Updated Name"
user.save! # Raises if validation failsUpdate with update!
Bulk Update
Increment a Value
Conditional Update
Update Only Changed Fields
Update with Validation
Update Timestamps
Update Without Callbacks
Verify Update
Related
Last updated
Was this helpful?