Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
require "rubygems"
require "faker"
require "couchrest"
DB = CouchRest.database!('http://127.0.0.1:5984/contacts')
class Contact < CouchRest::ExtendedDocument
use_database DB
property :first_name
property :last_name
property :company
property :phone_number
property :email
timestamps!
end
10000.times do
c = Contact.new
c.first_name = Faker::Name.first_name
c.last_name = Faker::Name.last_name
c.company = Faker::Company.name
c.phone_number = Faker::PhoneNumber.phone_number
c.email = Faker::Internet.email
c.save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment