From 7eb412f149e5d58eb71ebe189500682712925f11 Mon Sep 17 00:00:00 2001 From: Wendy Yang Date: Thu, 3 Oct 2024 15:28:03 +0100 Subject: [PATCH] add comment to the added method --- app/models/barcode/format_handlers.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/barcode/format_handlers.rb b/app/models/barcode/format_handlers.rb index 6eb42646db..9517412b8c 100644 --- a/app/models/barcode/format_handlers.rb +++ b/app/models/barcode/format_handlers.rb @@ -579,6 +579,9 @@ class Rvi < BaseRegExBarcode self.format = /\A(?RVI)-(?[0-9]{6,})\z/ end + # add AkerBarcode class here as it could be called in + # Barcode::FormatHandlers.const_get in app/models/barcode.rb to avoid + # uninitialized constant Barcode::FormatHandlers::AkerBarcode (NameError) class AkerBarcode < BaseRegExBarcode self.format = /\A(?Aker)-(?[0-9]{2,})\z/ end