-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi,
I have the following model:
class Run
include Mongoid::Document
include Mongoid::Extensions::Hash::IndifferentAccess
field :results, type: Array, default: []
end
I'm storing hashes inside the :results array. Is it possible to have indifferent access here? For example, when I try to
Run.create! results: [{foo: "bar"}]
Run.first.results.first[:foo] # is nil, doesn't work
Run.first.results.first["foo"] # is "bar", works
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels