2023-01-04 16:11:57 +00:00
|
|
|
module JamRuby
|
|
|
|
|
class UserMatchEmailSending < ActiveRecord::Base
|
2023-01-13 05:40:50 +00:00
|
|
|
|
|
|
|
|
serialize :sent_user_ids, Array
|
|
|
|
|
|
|
|
|
|
def sent_user_ids=(ids)
|
|
|
|
|
ids = ids.split(',') if ids.is_a?(String)
|
|
|
|
|
super(ids)
|
|
|
|
|
end
|
|
|
|
|
|
2023-01-04 16:11:57 +00:00
|
|
|
def completed?
|
|
|
|
|
!completed_at.nil?
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def self.most_recent
|
|
|
|
|
UserMatchEmailSending.order(created_at: :desc).first
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|