adjust templates, add timezone and locale

This commit is contained in:
Alex Turchyn
2023-06-30 01:26:13 +03:00
parent d0c7d449d5
commit c904d51302
47 changed files with 331 additions and 171 deletions
+5 -1
View File
@@ -15,6 +15,8 @@ class SetupController < ApplicationController
def create
@account = Account.new(account_params)
@account.timezone = Accounts.normalize_timezone(@account.timezone)
@user = @account.users.new(user_params)
if @user.save
@@ -24,6 +26,8 @@ class SetupController < ApplicationController
]
@account.encrypted_configs.create!(encrypted_configs)
Docuseal.refresh_default_url_options!
sign_in(@user)
redirect_to root_path
@@ -43,7 +47,7 @@ class SetupController < ApplicationController
def account_params
return {} unless params[:account]
params.require(:account).permit(:name)
params.require(:account).permit(:name, :timezone)
end
def encrypted_config_params