Check out example codes for "model with array rails". It will help you in understanding the concepts better.

Code Example 1

create_table :products do |t|
  t.string :name
  t.text :colors, array: true, default: []
end

Learn ReactJs, React Native from akashmittal.com