Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'pg'
- require 'active_record'
- = File.open('teste.txt')
- f_lines = f.read.split(";")
- conn = ActiveRecord::Base.establish_connection(:adapter => 'postgresql',
- :username => 'root',
- :password => "123",
- :host => "127.0.0.1",
- :database => "db")
- #query = "insert into students (name, registration, room, password) values "+ vetor[]
- #simulated = ActiveRecord::Base.connection.execute(query)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement