-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
I have an older project, just updated to rails 6.1 and ruby 3. However, I am seeing an issue when trying to read the values from here, and not sure why
class PostVideoType < PostMediaType
include Ruby::Enum
define :RAW, 'Raw Video'
define :GFYCAT, 'Gfycat'
define :GIPHY, 'Giphy'
define :KICKSTARTER, 'Kickstarter'
define :INSTAGRAM, 'Instagram'
define :IMGUR, 'Imgur'
define :TWITTER, 'Twitter'
define :VIDME, 'Vidme'
define :VIMEO, 'Vimeo'
define :VINE, 'Vine'
define :YOUTUBE, 'YouTube'
end
[1] pry(main)> PostVideoType.keys
=> [:RAW, :GFYCAT, :GIPHY, :KICKSTARTER, :INSTAGRAM, :IMGUR, :TWITTER, :VIDME, :VIMEO, :VINE, :YOUTUBE]
[2] pry(main)> PostVideoType.value(:RAW)
=> "Raw Video"
[3] pry(main)> PostVideoType.values
NoMethodError: undefined method `values' for nil
from /Users/redacted/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/ruby-enum-1.0.0/lib/ruby-enum/enum.rb:126:in `values'
It doesn't appear that the values method is working correctly, but I can't see why.