Class: Thredded::DatabaseSeeder::Topics
- Inherits:
-
CollectionSeedData
- Object
- BaseSeedData
- CollectionSeedData
- Thredded::DatabaseSeeder::Topics
- Defined in:
- lib/thredded/database_seeder.rb
Constant Summary collapse
- MODEL_CLASS =
Topic
Instance Attribute Summary
Attributes inherited from BaseSeedData
Instance Method Summary collapse
Methods inherited from CollectionSeedData
Methods inherited from BaseSeedData
create, #find_or_create, #initialize
Constructor Details
This class inherits a constructor from Thredded::DatabaseSeeder::BaseSeedData
Instance Method Details
#create(count: 1, messageboard: seeder.first_messageboard) ⇒ Object
221 222 223 224 225 226 227 228 229 |
# File 'lib/thredded/database_seeder.rb', line 221 def create(count: 1, messageboard: seeder.) log "Creating #{count} topics in #{.name}..." FactoryBot.create_list( :topic, count, messageboard: , user: seeder.users.sample, last_user: seeder.users.sample ) end |