Security fixes, bulk insert and upsert, seeds replanting

Posted by morgoth85, March 15, 2019 @ 12:00 am in News

Hello. This is Wojtek here bringing you the exciting updates from Rails.

Security fix releases of Rails

Rails,,,, and 6.0.0.beta3 have been released containing important security fixes. Note that with 6.0 release only Rails 6.x.y and Rails 5.2.x are guaranteed to receive both major and minor security fixes by Rails core.

Active Record adds “insert_all” and “upsert_all” methods

It’s now possible to insert many records at once within one SQL statement. You can check summary of this feature in Josef’s blog post.

Rails command “db:seed:replant” added

Bring back clean state of database seeds with this simple command without redoing the database structure.

Active Support adds Enumerable “including” method

Self-explained by an example:

[ 1, 2, 3 ].including(4, 5) => [ 1, 2, 3, 4, 5 ]

For parity, method without was renamed to excluding.

54 people contributed to Rails in the last 2 weeks. You can see the full list of changes here.

Until next time!