Skip to content

Commit 77fbe1c

Browse files
committed
Add missing CHANGELOG entry removed by mistake at 7f3b475 [ci skip]
1 parent d14da79 commit 77fbe1c

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

activerecord/CHANGELOG.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@
1313

1414
*Jon Leighton*
1515

16-
* Added `#update_columns` method which updates the attributes from
17-
the passed-in hash without calling save, hence skipping validations and
18-
callbacks. `ActiveRecordError` will be raised when called on new objects
19-
or when at least one of the attributes is marked as read only.
20-
21-
post.attributes # => {"id"=>2, "title"=>"My title", "body"=>"My content", "author"=>"Peter"}
22-
post.update_columns({title: 'New title', author: 'Sebastian'}) # => true
23-
post.attributes # => {"id"=>2, "title"=>"New title", "body"=>"My content", "author"=>"Sebastian"}
24-
25-
*Sebastian Martinez*
26-
2716
* Allow before and after validations to take an array of lifecycle events
2817

2918
*John Foley*
@@ -312,6 +301,15 @@
312301

313302
*Jon Leighton*
314303

304+
* `Relation#order`: make new order prepend old one.
305+
306+
User.order("name asc").order("created_at desc")
307+
# SELECT * FROM users ORDER BY created_at desc, name asc
308+
309+
This also affects order defined in `default_scope` or any kind of associations.
310+
311+
*Bogdan Gusiev*
312+
315313
* `Model.all` now returns an `ActiveRecord::Relation`, rather than an
316314
array of records. Use `Relation#to_a` if you really want an array.
317315

@@ -341,6 +339,17 @@
341339

342340
*Jon Leighton*
343341

342+
* Added `#update_columns` method which updates the attributes from
343+
the passed-in hash without calling save, hence skipping validations and
344+
callbacks. `ActiveRecordError` will be raised when called on new objects
345+
or when at least one of the attributes is marked as read only.
346+
347+
post.attributes # => {"id"=>2, "title"=>"My title", "body"=>"My content", "author"=>"Peter"}
348+
post.update_columns(title: 'New title', author: 'Sebastian') # => true
349+
post.attributes # => {"id"=>2, "title"=>"New title", "body"=>"My content", "author"=>"Sebastian"}
350+
351+
*Sebastian Martinez + Rafael Mendonça França*
352+
344353
* The migration generator now creates a join table with (commented) indexes every time
345354
the migration name contains the word `join_table`:
346355

0 commit comments

Comments
 (0)