Skip to content

Commit 6a35199

Browse files
authored
Update README.adoc
Updates the enum to show syntax that was introduced in Rails 7.
1 parent b077bc2 commit 6a35199

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,10 @@ lead to broken code.
430430
----
431431
class Transaction < ApplicationRecord
432432
# bad - implicit values - ordering matters
433-
enum type: %i[credit debit]
433+
enum :type, %i[credit debit]
434434
435435
# good - explicit values - ordering does not matter
436-
enum type: {
436+
enum :type, {
437437
credit: 0,
438438
debit: 1
439439
}

0 commit comments

Comments
 (0)