I am using Postgres. I have an ActiveRecord model with an integer column, for example:
t.integer "foo", array: true
If I assign a ruby ββarray to it, it will work as expected:
> @instance.foo = [6,7,8,9,1] > @instance.foo => [6, 7, 8, 9, 1]
However, if I give a string representation of this array, it tries to parse the data, but for some reason it always leaves the last element.
> @instance.foo = "[6,7,8,9,1]" > @instance.foo => [6, 7, 8, 9]
Why is this happening?