switch install state to db

This commit is contained in:
2026-01-23 12:20:13 +01:00
parent 965e8cdffe
commit dea0ef508a
6 changed files with 32 additions and 12 deletions
+16
View File
@@ -0,0 +1,16 @@
class SetupState < ApplicationRecord
def self.installed?
first&.installed? || false
end
def self.mark_installed!
record = first_or_initialize
record.installed = true
record.installed_at ||= Time.current
record.save!
end
def self.reset!
delete_all
end
end