I'm using postgres 9.6.1, Rails 4.2.0, and the following migration:
class CreateStageBatches < ActiveRecord::Migration
def change
create_table :stage_batches do |t|
t.text :item_ids, array: true, default: []
end
end
end
[9] pry(main)> StageBatch.new item_ids: [1,2,3]
=> #<StageBatch id: nil, item_ids: ["1", "2", "3"]>