netwire
(netwire)
5
Hi @alexbevi
Here’s what I did:
- created new project per Getting Started (Rails) — Mongoid Manual 7.1
- created a new model:
# frozen_string_literal: true
class Account
include Mongoid::Document
include Mongoid::Timestamps
field :email, type: String
end
- Run
rails c with
Account.delete_all
time_started = Time.now
(1..500).each do |i|
Account.create(email: "test#{i}@test.com")
end
puts "Finished creating items in #{Time.now - time_started} seconds."
Result:
Mongoid: 7.5.4: Finished creating items in 0.248197 seconds.
Mongoid: 8.1.4: Finished creating items in 1.228574 seconds.
Is there a way I can PM you the Git repository? I cannot upload Gemfile and Gemfile.lock