jam-cloud/ruby/lib/jam_ruby/models/user_match_email_sending.rb

19 lines
364 B
Ruby
Raw Permalink Normal View History

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