8e13ce5b78
I had reintroduced this indacb53b8after David removed it in6bbf68a4, but now I agree we don't need it. Also, fix a CORS error when trying to redirect a user to an untenanted path after login (see https://fizzy.37signals.com/5986089/collections/2/cards/1032).
18 lines
578 B
Ruby
18 lines
578 B
Ruby
require_relative "../../config/environment"
|
|
|
|
COLLECTIONS_COUNT = 100
|
|
CARDS_PER_COLLECTION = 50
|
|
|
|
ApplicationRecord.current_tenant = "development-tenant"
|
|
account = Account.sole
|
|
user = account.users.first
|
|
Current.session = user.sessions.last
|
|
workflow = account.workflows.first
|
|
|
|
COLLECTIONS_COUNT.times do |collection_index|
|
|
collection = Collection.create!(name: "Collection #{collection_index}", creator: user, workflow: workflow)
|
|
CARDS_PER_COLLECTION.times do |card_index|
|
|
collection.cards.create!(title: "Card #{card_index}", creator: user, status: :published)
|
|
end
|
|
end
|