尝试将枚举对象传递给序列化程序时,出现以下错误:
#<FastJsonapi::MandatoryField: id is a mandatory field in the jsonapi spec>
@drop_down_values = Organisation.ownerships
其中@drop_down_values 具有所有权列中的枚举值。
render json: DropDownValueSerializer.new(@drop_down_values).serialized_json