create an array in rails code example
Example 1: model with array rails
create_table :products do |t|
t.string :name
t.text :colors, array: true, default: []
end
Example 2: ruby create array
array = Array.new
create_table :products do |t|
t.string :name
t.text :colors, array: true, default: []
end
array = Array.new