diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-03-01 15:15:20 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-03-02 14:49:14 +1100 |
commit | 82f9d1f8618dd22bb7bb34456446ceaf8c742d54 (patch) | |
tree | 7ac655ca31986fd93e9c17f6b7efc4e8be38c8d8 /app/models/info_request_event.rb | |
parent | e55dfcf46e2b3821a9b0d6d796b5dbf50875dd24 (diff) |
InfoRequestEvent should know about its event types
Diffstat (limited to 'app/models/info_request_event.rb')
-rw-r--r-- | app/models/info_request_event.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index 024ae97a1..595c82d34 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -370,6 +370,14 @@ class InfoRequestEvent < ActiveRecord::Base ['followup_sent', 'followup_resent'].include?(event_type) end + def outgoing? + ['sent', 'followup_sent'].include?(event_type) + end + + def response? + event_type == 'response' + end + def same_email_as_previous_send? prev_addr = self.info_request.get_previous_email_sent_to(self) curr_addr = self.params[:email] |