CHANGELOG.md 1.2 KB
Newer Older
1 2 3 4 5
*   Ensure `Associations::CollectionAssociation#size` and `Associations::CollectionAssociation#empty?`
    use loaded association ids if present.

    *Graham Turner*

6 7 8 9
*   Add support to preload associations of polymorphic associations when not all the records have the requested associations.

    *Dana Sherson*

10 11 12 13 14 15 16 17
*   Add `touch_all` method to `ActiveRecord::Relation`.

    Example:

        Person.where(name: "David").touch_all(time: Time.new(2020, 5, 16, 0, 0, 0))

    *fatkodima*, *duggiefresh*

18
*   Add `ActiveRecord::Base.base_class?` predicate.
19 20 21

    *Bogdan Gusiev*

22 23 24 25
*   Add custom prefix option to ActiveRecord::Store.store_accessor.

    *Tan Huynh*

J
Jeremy Daer 已提交
26 27 28 29
*   Rails 6 requires Ruby 2.4.1 or newer.

    *Jeremy Daer*

30 31 32
*   Deprecate `update_attributes`/`!` in favor of `update`/`!`.

    *Eddie Lebow*
33 34 35 36 37

*   Add ActiveRecord::Base.create_or_find_by/! to deal with the SELECT/INSERT race condition in
    ActiveRecord::Base.find_or_create_by/! by leaning on unique constraints in the database.

    *DHH*
38

39 40 41 42
*   Add `Relation#pick` as short-hand for single-value plucks.

    *DHH*

43

44
Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activerecord/CHANGELOG.md) for previous changes.