diff options
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/request_mailer.rb | 8 | ||||
-rw-r--r-- | app/mailers/track_mailer.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/mailers/request_mailer.rb b/app/mailers/request_mailer.rb index 062655c5b..f12b4a0d6 100644 --- a/app/mailers/request_mailer.rb +++ b/app/mailers/request_mailer.rb @@ -234,7 +234,7 @@ class RequestMailer < ApplicationMailer end # Send email alerts for overdue requests - def self.alert_overdue_requests() + def self.alert_overdue_requests info_requests = InfoRequest.find(:all, :conditions => [ "described_state = 'waiting_response' @@ -338,8 +338,8 @@ class RequestMailer < ApplicationMailer # Send email alerts for requests which need clarification. Goes out 3 days # after last update of event. - def self.alert_not_clarified_request() - info_requests = InfoRequest.find(:all, :conditions => [ "awaiting_description = ? and described_state = 'waiting_clarification' and info_requests.updated_at < ?", false, Time.now() - 3.days ], :include => [ :user ], :order => "info_requests.id" ) + def self.alert_not_clarified_request + info_requests = InfoRequest.find(:all, :conditions => [ "awaiting_description = ? and described_state = 'waiting_clarification' and info_requests.updated_at < ?", false, Time.now - 3.days ], :include => [ :user ], :order => "info_requests.id" ) for info_request in info_requests alert_event_id = info_request.get_last_public_response_event_id last_response_message = info_request.get_last_public_response @@ -366,7 +366,7 @@ class RequestMailer < ApplicationMailer end # Send email alert to request submitter for new comments on the request. - def self.alert_comment_on_request() + def self.alert_comment_on_request # We only check comments made in the last month - this means if the # cron jobs broke for more than a month events would be lost, but no diff --git a/app/mailers/track_mailer.rb b/app/mailers/track_mailer.rb index fc7895203..3f5de6a1b 100644 --- a/app/mailers/track_mailer.rb +++ b/app/mailers/track_mailer.rb @@ -39,7 +39,7 @@ class TrackMailer < ApplicationMailer # User.find(:all, :conditions => [ "last_daily_track_email < ?", Time.now - 1.day ]).size def self.alert_tracks done_something = false - now = Time.now() + now = Time.now one_week_ago = now - 7.days User.find_each(:conditions => [ "last_daily_track_email < ?", now - 1.day ]) do |user| |