From 6a35199be94418df1ea32a8a7a1de447e7f56d7a Mon Sep 17 00:00:00 2001
From: Simmon Li
Date: Mon, 9 Dec 2024 13:25:53 -0500
Subject: [PATCH] Update README.adoc
Updates the enum to show syntax that was introduced in Rails 7.
---
README.adoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.adoc b/README.adoc
index 4f1fc57..8b4e310 100644
--- a/README.adoc
+++ b/README.adoc
@@ -430,10 +430,10 @@ lead to broken code.
----
class Transaction < ApplicationRecord
# bad - implicit values - ordering matters
- enum type: %i[credit debit]
+ enum :type, %i[credit debit]
# good - explicit values - ordering does not matter
- enum type: {
+ enum :type, {
credit: 0,
debit: 1
}