diff options
Diffstat (limited to 'guides/source/active_record_validations.md')
-rw-r--r-- | guides/source/active_record_validations.md | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 822d12aa3a..eaa47d4ebf 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -117,11 +117,10 @@ database only if the object is valid: * `save` * `save!` * `update` -* `update_attributes` -* `update_attributes!` +* `update!` The bang versions (e.g. `save!`) raise an exception if the record is invalid. -The non-bang versions don't: `save` and `update_attributes` return `false`, +The non-bang versions don't: `save` and `update` return `false`, `create` and `update` just return the objects. ### Skipping Validations @@ -656,8 +655,6 @@ class Coffee < ActiveRecord::Base end ``` -TIP: `:allow_nil` is ignored by the presence validator. - ### `:allow_blank` The `:allow_blank` option is similar to the `:allow_nil` option. This option @@ -673,8 +670,6 @@ Topic.create("title" => "").valid? # => true Topic.create("title" => nil).valid? # => true ``` -TIP: `:allow_blank` is ignored by the presence validator. - ### `:message` As you've already seen, the `:message` option lets you specify the message that |