update demo

This commit is contained in:
Pete Matsyburka committed 2026-10-07 09:00:58 +03:00
1 parent 80b24f0e2a
commit c1d809f989
5 files changed
+15 -38

No files matched your search

+6 -1
View File
@@ -118,7 +118,12 @@ class ApplicationController < ActionController::Base
end
def sign_in_for_demo
sign_in(User.active.order('random()').take) unless signed_in?
return if signed_in?
account = Account.create!(name: "Demo #{SecureRandom.hex(3)}")
sign_in(account.users.create!(first_name: 'Demo', last_name: 'User',
email: "#{SecureRandom.hex}@docuseal.com", password: SecureRandom.hex))
end
def current_account