Rel 4 tipe data Array PostgreSQL
Di terminal
$ rails generate migration AddTagsToProduct tags:string
Berkas migrasi:
class AddTagsToProduct < ActiveRecord::Migration
def change
add_column :products, :tags, :string, array: true, default: []
end
end
https://coderwall.com/p/sud9ja /rails-4-the-postgresql-array-data-type