Rails 8 introduces a new feature allowing developers to mark Active Record associations as deprecated using the `deprecated: true` option. This enables safe removal of old associations by providing deprecation warnings when they're accessed, queried, or trigger side effects. The feature supports three modes: warn (logs
Table of contents
Marking an association as deprecatedWorking with different association typesReporting modes and backtrace supportWhy deprecate rather than remove?Sort: