aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request_batch.rb
diff options
context:
space:
mode:
authorJames McKinney <james@slashpoundbang.com>2015-05-21 15:12:57 -0400
committerJames McKinney <james@slashpoundbang.com>2015-05-21 15:12:57 -0400
commitb90a5f5df568dc68e971a7d43532b5163f6cd08e (patch)
treee23905770c2efff46f879ae4b569fbaca086e106 /app/models/info_request_batch.rb
parentdd289908964c8d60e33ce71724dc9e36c3beb765 (diff)
Declare class methods the idiomatic Ruby way
Diffstat (limited to 'app/models/info_request_batch.rb')
-rw-r--r--app/models/info_request_batch.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/info_request_batch.rb b/app/models/info_request_batch.rb
index 5a20edce8..2847c8134 100644
--- a/app/models/info_request_batch.rb
+++ b/app/models/info_request_batch.rb
@@ -22,7 +22,7 @@ class InfoRequestBatch < ActiveRecord::Base
validates_presence_of :body
# When constructing a new batch, use this to check user hasn't double submitted.
- def InfoRequestBatch.find_existing(user, title, body, public_body_ids)
+ def self.find_existing(user, title, body, public_body_ids)
find(:first, :conditions => ['user_id = ?
AND title = ?
AND body = ?
@@ -70,7 +70,7 @@ class InfoRequestBatch < ActiveRecord::Base
info_request
end
- def InfoRequestBatch.send_batches()
+ def self.send_batches()
find_each(:conditions => "sent_at IS NULL") do |info_request_batch|
unrequestable = info_request_batch.create_batch!
mail_message = InfoRequestBatchMailer.batch_sent(info_request_batch,