22 lines
420 B
Ruby
22 lines
420 B
Ruby
module JamRuby
|
|
class EmailBatch < ActiveRecord::Base
|
|
self.table_name = "email_batches"
|
|
|
|
# has_many :email_batch_results, :class_name => 'JamRuby::EmailBatchResult'
|
|
|
|
def self.qualified_users
|
|
User.select(:email)
|
|
.where(:opt_out_email_batch => false)
|
|
.order('created_at DESC')
|
|
end
|
|
|
|
def deliver
|
|
self.class.qualified_users.each
|
|
end
|
|
|
|
def test_batch
|
|
end
|
|
|
|
end
|
|
end
|