I have added created new migration:
class AddColumnsToDiscipline < ActiveRecord::Migration
def change
add_column :disciplines, :days, :integer, array: true
end
end
Then I have run migration.
In my seed.rb file I have added this
t.disciplines.create(name: Company.name, days: [1, 2, 3])
After when I run rake db:seed, When I run my rails console all created models days attribute has nil value. Whad did I miss?
add_column :disciplines, :days, :text, array: true, default: []in your migration file and then runrake db:seedcommand