A user model has a goal field that is an array:
t.integer "goal", default: [], array: true
A valid entry for goal is [[],[],[]]. If I do
Match.create(goal: [[],[],[]])
I get an exception:
ActiveRecord::StatementInvalid: PG::InvalidTextRepresentation: ERROR: malformed array literal: "{{},{},{}}"
DETAIL: Unexpected "}" character.
I know that I can work around this by saving it as goal: [], but I lose information about the number of sub-arrays. Is there a way to fix this?