aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request_batch.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-11-27 17:40:59 +0000
committerLouise Crow <louise.crow@gmail.com>2013-12-04 09:32:45 +0000
commite55d7850d36b147275c2f8ffcacccbcf97e0a1d5 (patch)
tree2ac1125f2de15e0ca09ffb4ba580508a3064a0fd /app/models/info_request_batch.rb
parent0f43f36254c9bbd1a66f5fd0951d5c2517581e4d (diff)
Simplify return value, set sent_at in create_batch!
Diffstat (limited to 'app/models/info_request_batch.rb')
-rw-r--r--app/models/info_request_batch.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/info_request_batch.rb b/app/models/info_request_batch.rb
index 745cfe7d2..7e7390736 100644
--- a/app/models/info_request_batch.rb
+++ b/app/models/info_request_batch.rb
@@ -42,9 +42,12 @@ class InfoRequestBatch < ActiveRecord::Base
unrequestable << public_body
end
end
+ self.sent_at = Time.now
+ self.save!
end
created.each{ |info_request| info_request.outgoing_messages.first.send_message }
- return {:unrequestable => unrequestable}
+
+ return unrequestable
end
# Create and send an FOI request to a public body