Skip to content

Instantly share code, notes, and snippets.

@danielnc
Created August 24, 2016 20:10
Show Gist options
  • Save danielnc/915b9b17e5d38add47d5e18f5997d3cb to your computer and use it in GitHub Desktop.
Save danielnc/915b9b17e5d38add47d5e18f5997d3cb to your computer and use it in GitHub Desktop.
class Jobs::PatientsJob
include Sidekiq::Worker
def perform(name)
Patient.create(first_name: name, provider: Provider.order(:id).first, user: Provider.order(:id).first.users.first)
puts Patient.count
puts Provider.order("id desc").last.patients.count
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment