Answers for "can i store an array in sql database ruby on rails"

0

rails store array in database

class AddSubjectsToBook < ActiveRecord::Migration
  def change
    add_column :books, :subjects, :text, array:true, default: []
  end
end
Posted by: Guest on January-28-2021

Code answers related to "can i store an array in sql database ruby on rails"

Browse Popular Code Answers by Language