Reputation: 80
Following is my model which has a field with type array
class User::Log::Presentation
include Mongoid::Document
include Mongoid::Timestamps
field :name, type: String
field :fields, type: Array, default: []
end
When I try creating a document, it throws following error.
TypeError: no implicit conversion of String into Integer
I am totally lost with this. Couldnt find any answer is other questions. Please help.
Upvotes: 0
Views: 142
Reputation: 80
I did the following change and started working.
field :fields, type: Array, default: []
to
field :columns, type: Array, default: []
Upvotes: 1