ruby - Having Issues with Action Mailer Rails -


right working on building mailer feature app built in ruby on rails send message account when hasn't checked in day. forgo sending said email accounts not have check ins enabled.

here code sending email inactive accounts:

def self.inactive_accounts account.all.select |account|   yesterday = (1.day.ago.beginning_of_day..1.day.ago.end_of_day)   account.check_ins.where(worked_at: yesterday).empty? end 

end

def self.notify  inactive_accounts.each |account|    missingcheckinmailer.missing_check_in(account,1.day.ago).deliver_now   end end 

what trying figure out start code keeps these emails being sent accounts not have check in enabled.


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -