diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-12-03 09:22:41 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-12-03 09:22:41 +0000 |
commit | 7414ed478f212be2b48c95fafde15726b348b197 (patch) | |
tree | 1d89b90f604b837b097fb4274775c4f3b3a319d6 /app/models/user_info_request_sent_alert.rb | |
parent | 479c9cd4567e2042d00c347f25a411373a6b1df9 (diff) | |
parent | d05082c1cf1ddec789e547b54943f6e7d5bdffc1 (diff) |
Merge branch 'release/0.20'0.20.0.0
Conflicts:
config/general.yml-example
Diffstat (limited to 'app/models/user_info_request_sent_alert.rb')
-rw-r--r-- | app/models/user_info_request_sent_alert.rb | 24 |
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 |