0

以下は、配列型のフィールドを持つ私のモデルです

class User::Log::Presentation
  include Mongoid::Document
  include Mongoid::Timestamps

  field :name, type: String
  field :fields, type: Array, default: []
end

ドキュメントを作成しようとすると、次のエラーがスローされます。

TypeError: no implicit conversion of String into Integer

私はこれで完全に迷っています。答えが見つかりませんでした。他の質問です。助けてください。

4

1 に答える 1