Class: Thredded::DatabaseSeeder::FirstMessageboard

Inherits:
FirstSeedData show all
Defined in:
lib/thredded/database_seeder.rb

Constant Summary collapse

MODEL_CLASS =
Messageboard

Instance Attribute Summary

Attributes inherited from BaseSeedData

#seeder

Instance Method Summary collapse

Methods inherited from FirstSeedData

#find

Methods inherited from BaseSeedData

create, #find_or_create, #initialize

Constructor Details

This class inherits a constructor from Thredded::DatabaseSeeder::BaseSeedData

Instance Method Details

#createObject



207
208
209
210
211
212
213
214
215
# File 'lib/thredded/database_seeder.rb', line 207

def create
  log 'Creating a messageboard...'
  @first_messageboard = FactoryBot.create(
    :messageboard,
    name: 'Main Board',
    slug: 'main-board',
    description: 'A board is not a board without some posts'
  )
end