Skip to content
This repository has been archived by the owner on Feb 28, 2018. It is now read-only.

Commit

Permalink
send reminder email when there are remaining tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
interstateone committed Nov 1, 2012
1 parent e2b0232 commit 3b15933
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def send_reminder_email
return unless self.daily_reminder_permission return unless self.daily_reminder_permission
user_time = Time.now.in_time_zone(self.timezone) user_time = Time.now.in_time_zone(self.timezone)
puts "checking #{self.id}" puts "checking #{self.id}"
unless self.check_today? if self.remaining_tasks.length > 0
puts "no checks for #{self.id}" puts "remaining tasks for #{self.id}"
if ((user_time.hour == self.daily_reminder_time) && (user_time.min == 0)) || ((user_time.hour == self.daily_reminder_time - 1) && (user_time.min.between?(55,60))) if ((user_time.hour == self.daily_reminder_time) && (user_time.min == 0)) || ((user_time.hour == self.daily_reminder_time - 1) && (user_time.min.between?(55,60)))
puts "sending email to #{self.id}" puts "sending email to #{self.id}"


Expand Down
2 changes: 1 addition & 1 deletion public/js/views/settings.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define (require) ->
label: _.values(obj)[0] label: _.values(obj)[0]
callback result callback result
daily_reminder_permission: daily_reminder_permission:
title: 'Remind me each day if I haven\'t checked anything off yet' title: 'Remind me each day if I haven\'t completed all tasks'
type: 'Checkbox' type: 'Checkbox'
daily_reminder_time: daily_reminder_time:
title: 'Reminder time' title: 'Reminder time'
Expand Down

0 comments on commit 3b15933

Please sign in to comment.