diff options
author | francis <francis> | 2008-01-29 01:26:21 +0000 |
---|---|---|
committer | francis <francis> | 2008-01-29 01:26:21 +0000 |
commit | de7f36c6e3c5f1739a60839fe6bf3e7d510e1225 (patch) | |
tree | 7b8d74dd4face7a0c9aeee2a510278f184f30655 /app/models/incoming_message.rb | |
parent | 4cee79a9c722f5a9058f4d0e4390847f05aa2c3e (diff) |
First hack at new interface for classifying requests - is only per request, not
per message, and has more states.
Diffstat (limited to 'app/models/incoming_message.rb')
-rw-r--r-- | app/models/incoming_message.rb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 2d35e14f2..fcd73508e 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -1,16 +1,14 @@ # == Schema Information -# Schema version: 26 +# Schema version: 27 # # Table name: incoming_messages # -# id :integer not null, primary key -# info_request_id :integer not null -# raw_data :text not null -# created_at :datetime not null -# updated_at :datetime not null -# user_classified :boolean default(false), not null -# contains_information :boolean -# is_bounce :boolean default(false), not null +# id :integer not null, primary key +# info_request_id :integer not null +# raw_data :text not null +# created_at :datetime not null +# updated_at :datetime not null +# is_bounce :boolean default(false), not null # # models/incoming_message.rb: @@ -20,7 +18,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: incoming_message.rb,v 1.36 2008-01-24 15:53:15 francis Exp $ +# $Id: incoming_message.rb,v 1.37 2008-01-29 01:26:21 francis Exp $ # TODO @@ -280,6 +278,11 @@ class IncomingMessage < ActiveRecord::Base return nil end end + + # Has message arrived "recently"? + def recently_arrived + (Time.now - self.created_at) <= 3.days + end end |