Files
fizzy/script/fill_last_active_at.rb
T
2025-04-04 10:15:21 +02:00

10 lines
233 B
Ruby
Executable File

#!/usr/bin/env ruby
require_relative "../config/environment"
ApplicationRecord.with_each_tenant do |tenant|
Bubble.find_each do |bubble|
bubble.update! last_active_at: bubble.events.last&.created_at || Time.current
end
end