Rails 4 PostgreSQL Array-datatypen
I terminal
$ rails generate migration AddTagsToProduct tags:string
Migreringsfil:
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