---
title: "Active Record adds support for deprecating associations"
url: https://daily.dev/posts/active-record-adds-support-for-deprecating-associations-de098ju9y
source_url: https://www.bigbinary.com/blog/active-record-deprecated-associations
type: article
source: "BigBinary"
published: 2025-07-03T15:58:07.411Z
updated: 2025-07-03T15:58:30.840Z
tags: ["database", "ruby", "rails"]
reading_time: 3
upvotes: 1
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Active Record adds support for deprecating associations

**[BigBinary](https://daily.dev/sources/bigbinary)** · 3 min read · 1 upvotes · 0 comments

## Summary

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 warnings), raise (throws exceptions), and notify (emits events for external services). Developers can configure these settings globally or per environment, making it easier to phase out legacy associations in large codebases while maintaining safety through gradual deprecation.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.bigbinary.com/blog/active-record-deprecated-associations>

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#ruby](https://daily.dev/tags/ruby), [#rails](https://daily.dev/tags/rails)

[View this post on daily.dev](https://daily.dev/posts/active-record-adds-support-for-deprecating-associations-de098ju9y)
