jeudi 2 juin 2022

How can I import a file csv into the Rails database? [closed]

I want to be able to import a file csv to my database, could someone help me on how to do it? When importing the csv file I want it to be registered in my database. my db:

  class CreateData < ActiveRecord::Migration[5.2]
  def change
    create_table :data do |t|
      t.string :radio
      t.integer :net
      t.integer :mcc
      t.integer :area
      t.integer :cell
      t.float :latitude 
      t.float :length
      t.integer :range
      t.integer :samples
      t.integer :changeble
      t.timestamps
    end
  end
end

Aucun commentaire:

Enregistrer un commentaire