Why is ActiveRecord::Base#update_attributes deprecated?

Apidock is a little misleading, it actually says "deprecated or moved"; the latter is true, the former is not. ActiveRecord::Base includes ActiveRecord::Persistence, which defines #update_attributes. You can view the docs for this on apidock at http://apidock.com/rails/ActiveRecord/Persistence/update_attributes.

While this is also in ActiveResource now, there's no shared implementation of update_attributes, and you shouldn't look there for ActiveRecord::Base-related documentation, or vice versa.


In Rails 6 it became really deprecated. The reasons was discussed here:

https://github.com/rails/rails/pull/31998

The explanation is that both update_attributes and update_attributes! are just alias for update and update! for years and they can sound confusing (because of their singular versions: update_attribute).