From 455e5252d5cbdbebb605a97e8bc88ff144638a78 Mon Sep 17 00:00:00 2001 From: dominikp Date: Wed, 16 Jul 2025 14:27:29 +0200 Subject: [PATCH] doc(redmine6): add guide for using ApplicationRecord, refs #pbi-7854 --- docs/Major_releases/v15.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/Major_releases/v15.md b/docs/Major_releases/v15.md index 3d05027..92c3d10 100644 --- a/docs/Major_releases/v15.md +++ b/docs/Major_releases/v15.md @@ -16,11 +16,11 @@ for developers and maintainers who need to understand the implications of these ### Major Framework Upgrades -- ruby `">= 3.3.1"` → `">= 3.3.7", "< 3.4.0"` +- ruby `>= 3.3.1` → `~> 3.4.0` - Added upper bound to Ruby version -- rails `"~> 6.1.7.10"` → `"~> 7.2.2.1"` +- rails `~> 6.1.7.10` → `7.2.2.1` - Major framework upgrade -- rack `"~> 2.2.3"` → `"~> 3.1.3"` +- rack `~> 2.2.3` → `>= 3.1.3` ### Breaking Changes @@ -190,6 +190,24 @@ import "../src/easy_legacy_js/context_menu"; - Move legacy JavaScript files to `app/frontend/src/easy_legacy_js/` - Import them in `app/frontend/entrypoints/easy_legacy_js.js` +#### 2. Inheriting ActiveRecord models from ApplicationRecord + +All ActiveRecord models should now inherit from `ApplicationRecord` instead of `ActiveRecord::Base`. + +**Before:** +```ruby +class User < ActiveRecord::Base + # ... +end +``` + +**After:** +```ruby +class User < ApplicationRecord + # ... +end +``` + ### Recommendations for Upgrading 1. **Test thoroughly** - The framework changes are substantial and require extensive testing