Utilize new enum syntax

Utilize the new `enum` syntax in this guide to avoid confusion with the
old one.
This commit is contained in:
Wladimir Braguini Domingues 2024-01-01 22:52:52 -03:00
parent 581074c40d
commit 7904681f77
No known key found for this signature in database
GPG Key ID: 10F6DF3D7EBE0519

@ -292,9 +292,9 @@ Declaring an enum attribute in the model adds helper methods and prevents invali
```ruby
# app/models/article.rb
class Article < ApplicationRecord
enum status: {
enum :status, {
draft: "draft", published: "published", archived: "archived"
}, _prefix: true
}, prefix: true
end
```