Skip to content

Commit 1cd564a

Browse files
committed
chore: fix rails 8 enum syntax
1 parent 7e62cdc commit 1cd564a

File tree

1 file changed

+2
-2
lines changed
  • playground/vanilla/app/models

1 file changed

+2
-2
lines changed

playground/vanilla/app/models/song.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ class Song < ApplicationRecord
22
belongs_to :composer
33
has_many :video_clips
44

5-
enum genre: {fingerstyle: "fingerstyle", rock: "rock", classical: "classical"}
6-
enum tempo: %w[slow medium fast]
5+
enum :genre, fingerstyle: "fingerstyle", rock: "rock", classical: "classical"
6+
enum :tempo, %w[slow medium fast]
77
end

0 commit comments

Comments
 (0)