| 489 | | # Finds the record from the passed +id+, instantly saves it with the passed +attributes+ (if the validation permits it), |
|---|
| 490 | | # and returns it. If the save fails under validations, the unsaved object is still returned. |
|---|
| 491 | | # |
|---|
| 492 | | # The arguments may also be given as arrays in which case the update method is called for each pair of +id+ and |
|---|
| 493 | | # +attributes+ and an array of objects is returned. |
|---|
| 494 | | # |
|---|
| 495 | | # Example of updating one record: |
|---|
| | 489 | # Updates an object (or multiple objects) and saves it to the database, if validations pass. |
|---|
| | 490 | # The resulting object is returned whether the object was saved successfully to the database or not. |
|---|
| | 491 | # |
|---|
| | 492 | # ==== Options |
|---|
| | 493 | # |
|---|
| | 494 | # +id+ This should be the id or an array of ids to be updated |
|---|
| | 495 | # +attributes+ This should be a Hash of attributes to be set on the object, or an array of Hashes. |
|---|
| | 496 | # |
|---|
| | 497 | # ==== Examples |
|---|
| | 498 | # |
|---|
| | 499 | # # Updating one record: |
|---|