Sha256: 43dec0864c4a7a2185bf8487204b41c83746bf4dfb5df2f66b29f8a7b14a27f4
Contents?: true
Size: 336 Bytes
Versions: 19
Compression:
Stored size: 336 Bytes
Contents
module EgovUtils class ArchiveUsers def call EgovUtils::User .where.not(days_before_archive: nil, active: true).each do |user| date_to_compare = user.last_login_at || user.created_at next if date_to_compare > Time.now - user.days_before_archive.days user.destroy end end end end
Version data entries
19 entries across 19 versions & 1 rubygems