You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`ActiveRecord::Base` does not (and has never) inherit from
`ActiveModel::Model`.
`ActiveModel::API` was introduced in as an extraction from
`ActiveModel::Model`. At that time (Sep 15, 2021), it was included back
into `ActiveModel::Model`, but was never included in `ActiveRecord` at
all.
The intent communicated around the introduction of `ActiveModel::API`
stated:
> By moving `ActiveModel::Model`'s implementation to a new
> `ActiveModel::API` we keep a definition of the minimum API to talk with
> Action Pack and Action View.
Active Record is also designed to integrate with Action Pack and Action
View. It already does (and its integration predates `ActiveModel::API`
by more than a decade). It's integration is powered by including and
extending the same set of foundational modules, with some
database-specific overrides.
This commit adds an `include ActiveModel::API` statement to
`ActiveRecord::Base`, then re-structures those overrides to comply with
the new module resolution order.
[c477d95]: rails@c477d95
0 commit comments