Fill your DB with faker gem.
Code:
require 'mysql'
require 'faker'
db = Mysql::new("localhost", "root", "", "jazzezravi_development")
i=1
while i < 1000 do
c=Faker::Name.name
c.gsub("'","")
sql = "INSERT INTO batas VALUES(#{i},'#{c}','0','0');"
db.query(sql)
i+=1
end
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment