moving weekend logic into the next_attempt_at logic in recipient_schedule

This commit is contained in:
Jared Cosulich 2017-04-18 12:00:24 -04:00
parent ac7858c5f6
commit a2300a58b9
4 changed files with 32 additions and 12 deletions

View file

@ -2,11 +2,9 @@ namespace :survey do
desc 'Text all Recipients ready for an Attempt (only on weekdays)'
task :attempt_questions => :environment do
if Date.today.on_weekday?
Schedule.active.each do |schedule|
schedule.recipient_schedules.ready.each do |recipient_schedule|
recipient_schedule.attempt_question
end
Schedule.active.each do |schedule|
schedule.recipient_schedules.ready.each do |recipient_schedule|
recipient_schedule.attempt_question
end
end
end