From 71d5d2de779ef82a055c5d184553d004fb7eaec8 Mon Sep 17 00:00:00 2001 From: Nat Dean-Lewis Date: Tue, 28 Jul 2026 16:44:37 +0100 Subject: [PATCH] docs: clarify comments --- app/models/location.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/models/location.rb b/app/models/location.rb index 19469a12e..af33f8e7e 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -172,9 +172,6 @@ class Location < ApplicationRecord LOCAL_AUTHORITIES = LocalAuthority.all.map { |la| [la.name, la.code] }.to_h attribute :local_authorities, :string - # LOCAL_AUTHORITIES is derived from a class-load-time DB query, so it can be - # empty on a fresh/unseeded database. Rails 8.1's `enum` raises on empty - # values (7.2 treated it as a no-op), so only declare it when populated. enum :local_authorities, LOCAL_AUTHORITIES if LOCAL_AUTHORITIES.present? def self.local_authorities_for_current_year LocalAuthority.all.active(Time.zone.today).england.map { |la| [la.code, la.name] }.to_h