$ bundle install
$ rake db:create
$ rake db:migrate
$ rails c
require 'upsert/active_record_upsert'
Pet.transaction do
Pet.upsert({name: 'Jerry'}, breed: 'beagle', created_at: Time.now, updated_at: Time.now)
end
require 'upsert/active_record_upsert'
Pet.upsert({name: 'Jerry'}, breed: 'beagle', created_at: Time.now, updated_at: Time.now)
Pet.transaction do
Pet.upsert({name: 'Jerry'}, breed: 'beagle', created_at: Time.now, updated_at: Time.now)
end