aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/user_info_request_sent_alert.rb24
1 files changed, 14 insertions, 10 deletions
diff --git a/app/models/user_info_request_sent_alert.rb b/app/models/user_info_request_sent_alert.rb
index 098b773f8..cd163d14b 100644
--- a/app/models/user_info_request_sent_alert.rb
+++ b/app/models/user_info_request_sent_alert.rb
@@ -17,18 +17,22 @@
# Email: hello@mysociety.org; WWW: http://www.mysociety.org/
class UserInfoRequestSentAlert < ActiveRecord::Base
- belongs_to :user
- belongs_to :info_request
-
- validates_inclusion_of :alert_type, :in => [
+ ALERT_TYPES = [
'overdue_1', # tell user that info request has become overdue
'very_overdue_1', # tell user that info request has become very overdue
- 'new_response_reminder_1', # reminder user to classify the recent response
- 'new_response_reminder_2', # repeat reminder user to classify the recent response
- 'new_response_reminder_3', # repeat reminder user to classify the recent response
- 'not_clarified_1', # reminder that user has to explain part of the request
- 'comment_1', # tell user that info request has a new comment
+ 'new_response_reminder_1', # reminder user to classify the recent
+ # response
+ 'new_response_reminder_2', # repeat reminder user to classify the
+ # recent response
+ 'new_response_reminder_3', # repeat reminder user to classify the
+ # recent response
+ 'not_clarified_1', # reminder that user has to explain part of the
+ # request
+ 'comment_1' # tell user that info request has a new comment
]
-end
+ belongs_to :user
+ belongs_to :info_request
+ validates_inclusion_of :alert_type, :in => ALERT_TYPES
+end