Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

send reminder email when there are remaining tasks

  • Loading branch information...
commit 3b159337c1be811427ca6507c3bf5d077b1c3b49 1 parent e2b0232
@interstateone authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 app/models/user.rb
  2. +1 −1  public/js/views/settings.coffee
View
4 app/models/user.rb
@@ -71,8 +71,8 @@ def send_reminder_email
return unless self.daily_reminder_permission
user_time = Time.now.in_time_zone(self.timezone)
puts "checking #{self.id}"
- unless self.check_today?
- puts "no checks for #{self.id}"
+ if self.remaining_tasks.length > 0
+ 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)))
puts "sending email to #{self.id}"
View
2  public/js/views/settings.coffee
@@ -42,7 +42,7 @@ define (require) ->
label: _.values(obj)[0]
callback result
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'
daily_reminder_time:
title: 'Reminder time'
Please sign in to comment.
Something went wrong with that request. Please try again.