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:
parent
0149ca4ea1
commit
d3d9af8bce
6 changed files with 37 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue