1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 23:59:40 +02:00

Add basic self hosted onboarding (#1177)

* Add basic self hosted onboarding

* Lint fix

* Normalize translations
This commit is contained in:
Zach Gollwitzer 2024-09-13 17:24:19 -04:00 committed by GitHub
parent 0149ca4ea1
commit d3d9af8bce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 3 deletions

View file

@ -6,6 +6,7 @@ class Demo::Generator
end
def reset_and_clear_data!
reset_settings!
clear_data!
create_user!
@ -14,6 +15,7 @@ class Demo::Generator
def reset_data!
Family.transaction do
reset_settings!
clear_data!
create_user!
@ -52,12 +54,17 @@ class Demo::Generator
end
def clear_data!
InviteCode.destroy_all
User.find_by_email("user@maybe.local")&.destroy
ExchangeRate.destroy_all
Security.destroy_all
Security::Price.destroy_all
end
def reset_settings!
Setting.destroy_all
end
def create_user!
family.users.create! \
email: "user@maybe.local",