aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-17 14:22:27 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-17 14:22:34 +0100
commitc0d31ca41b2f019d3bf940ac79f104c412b115bf (patch)
tree4946099ab3a6cdffbb82a3fd78e77a7f4dccef58 /activerecord/lib/active_record/base.rb
parent020e656447a7cc2ce9cbf83483ab3b31730a565e (diff)
downloadrails-c0d31ca41b2f019d3bf940ac79f104c412b115bf.tar.gz
rails-c0d31ca41b2f019d3bf940ac79f104c412b115bf.tar.bz2
rails-c0d31ca41b2f019d3bf940ac79f104c412b115bf.zip
save(false) is gone, use save(:validate => false) instead.
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 4ee9887186..06244d1132 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -2136,16 +2136,16 @@ module ActiveRecord #:nodoc:
end
# :call-seq:
- # save(perform_validation = true)
+ # save(options)
#
# Saves the model.
#
# If the model is new a record gets created in the database, otherwise
# the existing record gets updated.
#
- # If +perform_validation+ is true validations run. If any of them fail
- # the action is cancelled and +save+ returns +false+. If the flag is
- # false validations are bypassed altogether. See
+ # By default, save always run validations. If any of them fail the action
+ # is cancelled and +save+ returns +false+. However, if you supply
+ # :validate => false, validations are bypassed altogether. See
# ActiveRecord::Validations for more information.
#
# There's a series of callbacks associated with +save+. If any of the
@@ -2220,7 +2220,7 @@ module ActiveRecord #:nodoc:
# in Base is replaced with this when the validations module is mixed in, which it is by default.
def update_attribute(name, value)
send(name.to_s + '=', value)
- save(false)
+ save(:validate => false)
end
# Updates all the attributes from the passed-in Hash and saves the record. If the object is invalid, the saving will