-
-
Save bdougie/e1691a2da5938c57be8f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Feedback | |
| def self.dispatch_surveys! | |
| upcoming_enrollments.each do |enrollment| | |
| Rails.logger.info "dispatching feedback request to #{enrollment.user.name}" | |
| enrollment.chain.feedbacks.create! | |
| end | |
| end | |
| def self.upcoming_enrollments | |
| all_active = Enrollment.currently_enrolled.includes | |
| date = upcoming_thursday | |
| all_active.select { |enrollment| CheckingFeedbackEligibility.new(enrollment, date).eligible? } | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment