File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -108,15 +108,27 @@ examples.
108
108
109
109
* - ``Model#update_attributes``
110
110
111
- *Update the provided attributes (and any other dirty fields).*
111
+ *Update the document attributes in the database. Will return true if validation passed,
112
+ false if not.*
112
113
-
113
114
.. code-block:: ruby
114
115
115
- person.update_attributes! (
116
+ person.update_attributes(
116
117
first_name: "Jean",
117
118
last_name: "Zorg"
118
119
)
119
120
121
+ * - ``Model#update_attributes!``
122
+
123
+ *Update the document attributes in the database and raise an error if validation failed.*
124
+ -
125
+ .. code-block:: ruby
126
+
127
+ person.update_attributes!(
128
+ first_name: "Leo",
129
+ last_name: "Tolstoy"
130
+ )
131
+
120
132
* - ``Model#update_attribute``
121
133
122
134
*Update a single attribute, bypassing validations.*
@@ -440,4 +452,4 @@ To create a collection with a default collation from the Mongo console:
440
452
441
453
.. code-block:: javascript
442
454
443
- db.createCollection("name", { collation: { locale: 'fr' } });
455
+ db.createCollection("name", { collation: { locale: 'fr' } });
You can’t perform that action at this time.
0 commit comments