Closed
Description
Having this model:
class Team < ActiveRecord::Base
# Gender enumerator
enum gender: [:male, :female]
# User ownership association
belongs_to :owner, class_name: 'User'
# Validations
validates :name, :owner, presence: true
end
with a field gender of type integer, trying to annotate it gives:
Unable to annotate team.rb: You tried to define an enum named "gender" on the model "Team", but this will generate a instance method "gender=", which is already defined by another enum.
So I have to remove the enum thing in the model, run the annotation and add it back.
Is there a workaround for this?