public
Description: Sequel: The Database Toolkit for Ruby
Homepage: http://sequel.rubyforge.org
Clone URL: git://github.com/jeremyevans/sequel.git
Document save/save! behavior explicitly if raise_on_save_failure is true 
and the save fails
jeremyevans (author)
Wed Oct 08 12:13:53 -0700 2008
commit  ccc23f47c0a0198c557906574d45bdaf0b8fdadd
tree    dcfdad9336d965239e20568e90ca073554a66f2e
parent  f7ed8c2d21c0aec99098d69af24d2b385dadc0cc
...
204
205
206
207
 
 
208
209
210
...
217
218
219
220
 
221
222
223
...
204
205
206
 
207
208
209
210
211
...
218
219
220
 
221
222
223
224
0
@@ -204,7 +204,8 @@ module Sequel
0
     # Creates or updates the record, after making sure the record
0
     # is valid. If the record is not valid, or before_save,
0
     # before_create (if new?), or before_update (if !new?) return
0
- # false, returns nil unless raise_on_save_failure is true.
0
+ # false, returns nil unless raise_on_save_failure is true (if it
0
+ # is true, it raises an error).
0
     # Otherwise, returns self. You can provide an optional list of
0
     # columns to update, in which case it only updates those columns.
0
     def save(*columns)
0
@@ -217,7 +218,7 @@ module Sequel
0
     # in which case it only updates those columns.
0
     # If before_save, before_create (if new?), or before_update
0
     # (if !new?) return false, returns nil unless raise_on_save_failure
0
- # is true. Otherwise, returns self.
0
+ # is true (if it is true, it raises an error). Otherwise, returns self.
0
     def save!(*columns)
0
       opts = columns.extract_options!
0
       return save_failure(:save) if before_save == false

Comments

    No one has commented yet.