Switch to new enum syntax in example code [ci-skip]

This commit is contained in:
Jonathan Hefner 2024-01-01 21:29:58 -06:00
parent 9fc5572e17
commit ad2354e6c6
2 changed files with 2 additions and 2 deletions

@ -56,7 +56,7 @@ def read_attribute_before_type_cast(attr_name)
# serialization.
#
# class Book < ActiveRecord::Base
# enum status: { draft: 1, published: 2 }
# enum :status, { draft: 1, published: 2 }
# end
#
# book = Book.new(status: "published")

@ -68,7 +68,7 @@ class Object
# You can access these methods using the class name instead:
#
# class Phone < ActiveRecord::Base
# enum phone_number_type: { home: 0, office: 1, mobile: 2 }
# enum :phone_number_type, { home: 0, office: 1, mobile: 2 }
#
# with_options presence: true do
# validates :phone_number_type, inclusion: { in: Phone.phone_number_types.keys }