Module: WithReminders::ClassMethods

Defined in:
app/models/concerns/with_reminders.rb

Instance Method Summary collapse

Instance Method Details

#remindableObject



53
54
55
56
57
# File 'app/models/concerns/with_reminders.rb', line 53

def remindable
  where('accepts_reminders  and email is not null
                            and last_organization_id is not null
                            and (last_submission_date < ? or last_submission_date is null)', reminder_frequency.days.ago)
end

#reminder_frequencyObject

The frequency of reminders, expressed in days



60
61
62
# File 'app/models/concerns/with_reminders.rb', line 60

def reminder_frequency
  Rails.configuration.reminder_frequency
end