Files
simple-aircraft-manager-rails/app/mailers/admin_mailer.rb
T
rickyandClaude Opus 5.5 1412470cd5 Maintenance commands: doctor, records check, restore, sign out all, more
- sam:doctor: health report (secret key, address, HTTPS, SMTP and SSO
  reachable, Google Drive, migrations, disk, jobs, backup/check/off-site/
  procedures/audit recency); exits 1 on a failure
- records:check: backup now + history and signature check; exits 1 on a problem
- backups:list / backups:restore[file]: checks the copy (nightly or Drive
  .gz), refuses while the server runs, moves the current DB aside, asks
  (CONFIRM=yes to skip)
- users:sign_out_all, sam:records_package[tail], email:test[address],
  offsite:backup, offsite:restore_test
- Admin guide: maintenance commands table, restore steps use backups:restore

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 16:42:52 -05:00

19 lines
560 B
Ruby

class AdminMailer < ApplicationMailer
def records_alert(user, backup, check)
@backup = backup
@check = check
mail subject: "Records check needs attention", to: user.email_address
end
def offsite_alert(user, run)
@run = run
mail subject: run.kind == "restore_test" ? "Off-site restore test failed" : "Off-site backup failed", to: user.email_address
end
def test_email(user, via: "from Admin → About")
@user = user
@via = via
mail subject: "Test email from Simple Aircraft Manager", to: user.email_address
end
end