Created
August 24, 2016 20:10
-
-
Save danielnc/915b9b17e5d38add47d5e18f5997d3cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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