Add users to the populater too

This commit is contained in:
David Heinemeier Hansson
2025-11-18 17:59:13 +01:00
parent 9cbb6b4569
commit 43d384961a
+5
View File
@@ -5,6 +5,7 @@ ACCOUNT = Account.find_by(name: "cleanslate")
CARDS_COUNT = ARGV.first&.to_i || 10_000 CARDS_COUNT = ARGV.first&.to_i || 10_000
BOARDS_COUNT = ARGV.second&.to_i || 100 BOARDS_COUNT = ARGV.second&.to_i || 100
TAGS_COUNT = ARGV.third&.to_i || 500 TAGS_COUNT = ARGV.third&.to_i || 500
USERS_COUNT = ARGV.fourth&.to_i || 1000
Current.account = ACCOUNT Current.account = ACCOUNT
Current.session = ACCOUNT.users.last.identity.sessions.first Current.session = ACCOUNT.users.last.identity.sessions.first
@@ -29,5 +30,9 @@ Board.suppressing_turbo_broadcasts do
ACCOUNT.cards.take.toggle_tag_with Faker::Game.title ACCOUNT.cards.take.toggle_tag_with Faker::Game.title
print "." print "."
end end
USERS_COUNT.times do
ACCOUNT.users.create! name: Faker::FunnyName
end
end end
end end