Skip to content

Commit ce34a93

Browse files
authored
Merge pull request #362 from crespire/crespire/enum-syntax-update
Update `Enum` syntax
2 parents b077bc2 + 6a35199 commit ce34a93

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)