Action Record

Rails 6.1

Rails 6.1 adds *_previously_was attribute methods

Rails 6.1 dirty tracks the previous attribute value after the model is saved or reset.

Read
Rails 6

Rails 6 adds ActiveRecord::Relation#annotate

Rails 6 allow adding comments to the SQL queries generated by the ActiveRecord::Relation instance.

Read
Rails 6

Rails 6 adds delete_by, destroy_by ActiveRecord::Relation

Rails 6 adds delete_by, destroy_by methods to find and destroy/delete ActiveRecord::Relation records.

Read
Rails 6

Rails 6 adds negative scopes on enum

Rails 6 now by default adds negative enum scopes to filter records easily.

Read
Rails 5

Rails 5 Active Record attributes API

Rails 5 makes the attribute API public to converts the attribute value to an appropriate Ruby type.

Read